In all the built in .net WPF controls, you may override the default style, and specify your own custom template. In my usage, it allows me to view a Textbox as a Label, have a button clicked to switch the mode to Edit mode, and switch the style to change the control back to a TextBox.
When I attempt to do the same thing for the Telerik - RadAutoCompleteTextbox, with this style, I get the following error (view mode)
Object reference not set to an instance of an object.
at Telerik.Windows.Controls.RadAutoCompleteBox.InitializeBoxesItemsControl() in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Input\AutoCompleteBox\RadAutoCompleteBox.cs:line 1067
Is there something I'm missing? Is there another way to accomplish this goal ? Should not the concept of lookless controls be supported?
thanks!
When I attempt to do the same thing for the Telerik - RadAutoCompleteTextbox, with this style, I get the following error (view mode)
<Style x:Key="RadAutoCompleteBoxViewMode" TargetType="{x:Type telerik:RadAutoCompleteBox}"> <Setter Property="OverridesDefaultStyle" Value="True" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type telerik:RadAutoCompleteBox}"> <Label Content="{Binding SearchText, RelativeSource={RelativeSource AncestorType=telerik:RadAutoCompleteBox}}" Style="{StaticResource FormFieldReadOnly}" /> </ControlTemplate> </Setter.Value> </Setter> </Style>Object reference not set to an instance of an object.
at Telerik.Windows.Controls.RadAutoCompleteBox.InitializeBoxesItemsControl() in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Input\AutoCompleteBox\RadAutoCompleteBox.cs:line 1067
Is there something I'm missing? Is there another way to accomplish this goal ? Should not the concept of lookless controls be supported?
thanks!