一个“Rectangle”元素:
<Rectangle Height="17" HorizontalAlignment="Left" Margin="100,142,0,0" Name="rectangle1" Stroke="Black" StrokeThickness="1" VerticalAlignment="Top" Width="94" Fill="#FF3E4049" />问题一:在VS2010中看不到“Z-Index”属性(Blend4可以),应该怎样将其显示顺序,设置在其它的“XAML元素”之上???这个可以设置么?<UserControl.Resources>
<Style x:Key="BarStyle" TargetType="my:BarIndicator">
<Setter Property="StartWidth" Value="0"/>
<Setter Property="Placement" Value="Inside"/>
</Style>
</UserControl.Resources>问题二:“<Setter Property="Z-Index" Value="1"/>”这样设置可以么?
<Rectangle Height="17" HorizontalAlignment="Left" Margin="100,142,0,0" Name="rectangle1" Stroke="Black" StrokeThickness="1" VerticalAlignment="Top" Width="94" Fill="#FF3E4049" />问题一:在VS2010中看不到“Z-Index”属性(Blend4可以),应该怎样将其显示顺序,设置在其它的“XAML元素”之上???这个可以设置么?<UserControl.Resources>
<Style x:Key="BarStyle" TargetType="my:BarIndicator">
<Setter Property="StartWidth" Value="0"/>
<Setter Property="Placement" Value="Inside"/>
</Style>
</UserControl.Resources>问题二:“<Setter Property="Z-Index" Value="1"/>”这样设置可以么?
解决方案 »
- C# winform panel中的子窗体切换时,子窗体的背景图片闪烁
- vs2008和vs2005的ajax代码有不同吗?
- 问一个关于用c# dataset保存T-SQL存储过程的返回集合
- 一个操作 ACCESS 数据库的问题!
- this.options[this.selectedIndex].value是作什么用的呀?
- 文件夹大写字母,全部转换成小定字母
- 怎么做一个滚动广告,要求滚动条中的字可以从XML文件中读出
- 各位都用过那些 winform 界面控件?
- 结构体指针在C#中的实现
- 这两天服务器不知道怎么的,IIS总是自动关闭...程序问题?请帮忙。
- iframe的问题求解
- 有关socket通信
<UserControl.Resources>
<Style x:Key="BarStyle" TargetType="my:BarIndicator">
<Setter Property="StartWidth" Value="0"/>
<Setter Property="Placement" Value="Inside"/>
</Style>
</UserControl.Resources>
<Canvas.Resources>
<Style x:Key="BarStyle" TargetType="my:NeedleIndicator">
<Setter Property="Canvas.ZIndex" Value="2"></Setter>
</Style>
</Canvas.Resources>
<my:Gauge Name="SLGauges" Height="242" Width="290">
<my:Gauge.Indicators>
<my:NeedleIndicator Name="BI_Value" Style="{StaticResource BarStyle}" ></my:NeedleIndicator>
</my:Gauge.Indicators>
<my:Gauge.CircularScales>
<my:CircularScale Minimum="0" Maximum="10000" >
</my:CircularScale>
</my:Gauge.CircularScales>
</my:Gauge>
</Canvas>
是的。<Grid x:Name="LayoutRoot" Background="White">
<Canvas>
<Canvas.Resources>
<Style x:Key="BarStyle" TargetType="my:NeedleIndicator">
<Setter Property="Canvas.ZIndex" Value="2"></Setter>
</Style>
</Canvas.Resources>
<my:Gauge Name="SLGauges" Height="242" Width="290">
<my:Gauge.Indicators>
<my:NeedleIndicator Name="BI_Value" Style="{StaticResource BarStyle}" ></my:NeedleIndicator>
</my:Gauge.Indicators>
<my:Gauge.CircularScales>
<my:CircularScale Minimum="0" Maximum="10000" >
</my:CircularScale>
</my:Gauge.CircularScales>
</my:Gauge>
</Canvas>
<TextBox Height="23" HorizontalAlignment="Left" Margin="101,144,0,0" Name="tb_Value" VerticalAlignment="Top" Width="88" Foreground="#FFD7D9DC" Background="#FF3E4049" Text="" />
</Grid>问题:现在是想“my:NeedleIndicator”元素(BI_Value),显示在“TextBox”(tb_Value)的上面,是不是把“TextBox”(tb_Value)放在“Canvas”元素里面就可以了?