I am developing a Custom Control, where there is a TextBox and a Button placed inside the Grid.
The thing is when I set a Custom Property for the UserControl Say - Left : the Button should be displayed before the TextBox, and for Right the Button should be displayed on the right side of the text box.
Since, I am defining both the elements in a Grid - am not able to position as per my requirements.
If you have to use a
Grid, You can make yourGridhave 3 columns and switch theTextBoxGrid.Columnbased on your custom property.you can switch the
{x:Type UserControl}in theDataTriggerto your{x:Type CustomUserControl}