本文整理汇总了C#中System.Windows.Controls.Canvas.Hide方法的典型用法代码示例。如果您正苦于以下问题:C# Canvas.Hide方法的具体用法?C# Canvas.Hide怎么用?C# Canvas.Hide使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Controls.Canvas
的用法示例。
在下文中一共展示了Canvas.Hide方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AvalonExampleGalleryCanvas
//.........这里部分代码省略.........
Position = i * Math.PI * 2 / AllPages.Count,
MouseEnter =
delegate
{
cc.Caption.Text = o.Caption.Text;
},
MouseLeave =
delegate
{
cc.Caption.Text = cc_Caption;
},
Click =
delegate
{
o.InitializeHint();
navbar.History.Add(
delegate
{
cc.Timer.Start();
o.Target.Orphanize();
CarouselPages.Show();
Overlay.Show();
btnCarouselCanvas.Show();
},
delegate
{
if (AtViewSelected != null)
AtViewSelected(o.Caption.Text);
btnCarouselCanvas.Hide();
cc.Timer.Stop();
CarouselPages.Hide();
Overlay.Hide();
o.Target.AttachTo(Container);
}
);
}
};
cc.AddEntry(ce);
OptionPosition p = null;
if (GetOptionPosition != null)
p = GetOptionPosition(o.Caption.Text);
if (p == null)
{
o.MoveTo(
48 + (180) * (i % 4),
36 + Convert.ToInt32(i / 4) * 128
);
}
else
{
p.Clear();
o.MoveTo(
p.X,
p.Y
);
示例2: AvalonPipeManiaCanvas
//.........这里部分代码省略.........
}
},
{ typeof(SpaceInvaderTest),
() => new SpaceInvaderTest
{
Visibility = Visibility.Hidden
}
},
{ typeof(AnimationsTest),
() => new AnimationsTest
{
Visibility = Visibility.Hidden
}
},
};
var Content = new Canvas
{
Width = DefaultWidth,
Height = DefaultHeight
}.AttachTo(this);
var Buttons = new Canvas
{
Width = DefaultWidth,
Height = DefaultHeight
}.AttachTo(this);
var Navigationbar = new AeroNavigationBar();
Navigationbar.Container.MoveTo(4, 4).AttachTo(this);
#region generate the menu
const int ButtonHeight = 30;
// x:\jsc.svn\examples\actionscript\Test\TestDictionaryOfTypeAndFunc\TestDictionaryOfTypeAndFunc\ApplicationCanvas.cs
Options
//.ForEach(
.Select(Option => new { Option.Key, Option.Value })
.WithEachIndex(
(Option, Index) =>
{
var x = 72;
var y = 16 + Index * ButtonHeight;
var Button = new TextButtonControl
{
Text = (Index + 1) + ". Open " + Option.Key.Name,
Width = 200,
Height = ButtonHeight
};
Button.Background.Fill = Brushes.Black;
Button.Background.Opacity = 0.5;
Button.Foreground = Brushes.Blue;
Button.MouseEnter +=
delegate
{
Button.Background.Fill = Brushes.Blue;
Button.Background.Opacity = 0.5;
Button.Foreground = Brushes.White;
};
Button.MouseLeave +=
delegate
{
Button.Background.Fill = Brushes.Black;
Button.Background.Opacity = 0.5;
Button.Foreground = Brushes.Blue;
};
var OptionCanvas = default(Canvas);
Button.Click +=
delegate
{
if (OptionCanvas == null)
OptionCanvas = Option.Value();
Navigationbar.History.Add(
delegate
{
OptionCanvas.Orphanize().Hide();
Buttons.Show();
},
delegate
{
OptionCanvas.AttachTo(Content).Show();
Buttons.Hide();
}
);
};
Button.Container.MoveTo(x, y).AttachTo(Buttons);
}
);
#endregion
}