Note that there are some explanatory texts on larger screens.

plurals
  1. POWPF (VS2010/.NET4.0) Create a re-usable form layout
    text
    copied!<p>In a nutshell what Im trying to achieve is to have a re-usable DLL which will potentially have a wizard like form. I could then simply set the content. Ive spent quite a bit of time searching but Im still not sure whats the best way to go. Ive had a look at <a href="https://stackoverflow.com/questions/2883837/how-to-create-reusable-wpf-grid-layout">this</a> article as well.</p> <p>Ive got the following structure in the XAML code:</p> <pre><code>&lt;Grid x:Name="MainGrid"&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height="20"/&gt; &lt;RowDefinition Height="30"/&gt; &lt;RowDefinition Height="20"/&gt; &lt;RowDefinition Height="30"/&gt; &lt;RowDefinition Height="*"/&gt; &lt;RowDefinition Height="30"/&gt; &lt;RowDefinition Height="20"/&gt; &lt;/Grid.RowDefinitions&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition Width="20"/&gt; &lt;ColumnDefinition Width="50"/&gt; &lt;ColumnDefinition Width="*"/&gt; &lt;ColumnDefinition Width="50"/&gt; &lt;ColumnDefinition Width="20"/&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;Label Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Content="{Binding ScreenTitleText}" /&gt; &lt;Label x:Name="ContentTitle" Grid.Row="3" Grid.Column="2" Grid.ColumnSpan="2" Content="{Binding ContentTitleText}" /&gt; &lt;Button x:Name="BackButton" Grid.Row="5" Grid.Column="1" Content="Back" /&gt; &lt;Button x:Name="NextButton" Grid.Row="5" Grid.Column="3" Content="Next" /&gt; &lt;ScrollViewer Grid.Row="4" Grid.Column="2" Content="{Binding InnerContent}" x:Name="InnerControl"/&gt; &lt;/Grid&gt; </code></pre> <ol> <li>Id like to know how to make it so that I could set the content on row=4 and column=2 to say for example a set of radio buttons.</li> <li>How to have this code in a DLL so that I could re-use it.</li> </ol> <p>Thanks!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload