I have A problem regarding Converting Xaml to C# , I m using Auto complete Box Tab order is not working Properly On that Means First we move all the control and at last I goes on Auto complete Box i m solving this through the xaml code
<ToolKit:AutoCompleteBox.TextBoxStyle>
<Style TargetType="TextBox">
<Setter Property="TabIndex"
Value="{Binding ElementName=txtFirstName, Path=TabIndex}"/>
</Style>
</ToolKit:AutoCompleteBox.TextBoxStyle>
Now on Another i m using All Control Dynamic so no Xaml there For Auto complete My All Works Is to be Complete But i m Facing Same Tab order problem How Can I convert Above Xaml Code From C#
ctrl = new AutoCompleteBox { FontSize = 14, MaxDropDownHeight = 90 };
//Here We need to Implement That Style
ctrl.TabIndex = c.TabOrder;
ctrl.MaxWidth = 200;
if (c.SpName != null && c.DisplayMember != null)
{
DataTable dt = sqlHelper.ExecuteSelectProcedure(c.SpName);
var cmb = ctrl as AutoCompleteBox;
cmb.ItemsSource = dt.AsEnumerable().Select(r => r.Field<string>(c.DisplayMember)).ToList();
}
Please Help Me out Thanks And Regards
Shashank Tyagi
This Code Perfectly works