请问怎么访问BarStaticItem.ContentTemplate的控件
请问大神,关于Ribbon Control中的控件,想请问1. 怎么访问BarStaticItem.ContentTemplate里面的控件,我想操作SearchTextBox.NullText, 还有 SearchTextBox.EditValueChanged 事件.但是我在后台代码里面没看到 SearchTextBox。 同样,在CheckEdit, 我想访问 CheckEditSearchPartnumber.IsChecked 和 CheckEditSearchPartnumber.CheckedChanged 事件.2. 我用ListBoxEditSettings的Radiobutton. 如果我默认选中一个,发现生成之后,选中的那个就不显示了,如果不默认选一个,就都能显示出来。<dxr:RibbonPageGroup Caption="Quick Search">
<dxb:BarStaticItem x:Name="bSearchTextBox">
<dxb:BarStaticItem.ContentTemplate>
<DataTemplate>
<StackPanel>
<StackPanel Orientation="Vertical" >
<dxe:ButtonEdit x:Name="SearchTextBox" Margin="5,5,5,5"
VerticalContentAlignment="Center"
AllowDefaultButton="False"
AllowNullInput="True"
NullText="Search Partnumber..."
NullValueButtonPlacement="EditBox"
ShowNullText="True" Height="30" Width="300" >
<dxe:ButtonInfox:Name="SearchButtonInfo" GlyphKind="Search" Visibility="Visible" />
</dxe:ButtonEdit>
</StackPanel>
<StackPanel Orientation="Horizontal">
<dxe:CheckEdit x:Name="CheckEditSearchPartnumber" Content="Search Partnumber" IsThreeState="False" Margin="5 0 15 0"IsChecked="True"/>
<dxe:CheckEdit x:Name="CheckEditSearchDescription"Content="Search Description" IsThreeState="False" Margin="15 0 0 0" IsChecked="False"/>
</StackPanel>
</StackPanel>
</DataTemplate>
</dxb:BarStaticItem.ContentTemplate>
</dxb:BarStaticItem>
</dxr:RibbonPageGroup>
<dxr:RibbonPageGroup Caption="Incoterms">
<dxb:BarEditItem UseLightweightTemplates="False" x:Name="bIncoterm" >
<dxb:BarEditItem.EditSettings >
<dxe:ListBoxEditSettings x:Name="ListBoxIncoterm">
<dxe:ListBoxEditSettings.StyleSettings>
<dxe:RadioListBoxEditStyleSettings />
</dxe:ListBoxEditSettings.StyleSettings>
<dxe:ListBoxEditSettings.Items >
<!--The bCIP one will not show-->
<dxe:ListBoxEditItem x:Name="bCIPChina" Content="CIP China" Margin="5,0,5,0"/>
<dxe:ListBoxEditItem x:Name="bDDPHK"Content="DDP Hong Kong" Margin="5,0,5,0"/>
<dxe:ListBoxEditItem x:Name="bDDPChina" Content="DDP China" Margin="5,0,5,0"/>
</dxe:ListBoxEditSettings.Items>
</dxe:ListBoxEditSettings>
</dxb:BarEditItem.EditSettings>
</dxb:BarEditItem>
</dxr:RibbonPageGroup>
页:
[1]