【发布时间】:2018-09-16 05:18:40
【问题描述】:
我需要为我的单选按钮控件添加换行,除了一个窗口。当单选按钮添加到不需要换行的不同页面时,我一直试图弄清楚如何有条件地从我的控件中删除或更改我的换行面板的值。
这是添加包装的编码。
XAML
<Style TargetType="auc:APRadioButtonListBox">
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
<Setter Property="IsTabStop" Value="True" />
<Setter Property="FontSize" Value="{StaticResource FontSize}" />
<Setter Property="Margin" Value="-2,0,0,0" />
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<toolkit:WrapPanel Background="Transparent" ItemWidth="Auto" x:Name="RadioListWrapPanel" Orientation="Horizontal" />
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
<Setter Property="ItemTemplate">
C#
public virtual ItemsPanelTemplate ItemsPanel { get; set; }
谁能建议我如何在不换行的情况下将单选按钮添加到另一个页面。
【问题讨论】:
-
这种风格是在什么级别定义的?应用程序资源字典,还是特定的页面/容器控件?
-
应用资源字典@Fabulous
标签: c# asp.net xaml silverlight