Note that there are some explanatory texts on larger screens.

plurals
  1. POChanging Silverlight view
    primarykey
    data
    text
    <p>I am trying to create a extension from an existing view where I have a list of text controls and in the new project I would like to use this control and change one of these text boxes to a radio button. </p> <p>Using MVVM makes it easy to use the same code without having duplicated code, but for the XAML view I find no good way to do this change without creating a copy.</p> <p>Example:</p> <p>Core project with the main user control</p> <pre><code>&lt;UserControl x:Class="SilverlightApplication4.MainPage" Name="test" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400"&gt; &lt;Grid x:Name="LayoutRoot" Background="White"&gt; &lt;StackPanel&gt; &lt;TextBlock&gt; asdfasdf this is a test &lt;/TextBlock&gt; &lt;Button Height="120" Name="asdf" Content="This is a Button"&gt; &lt;/Button&gt; &lt;/StackPanel&gt; &lt;/Grid&gt; &lt;/UserControl&gt; </code></pre> <p>Now I have a second project where I want to change the TextBlock to something else.</p> <pre><code>&lt;UserControl x:Class="SilverlightApplication1.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" xmlns:core="clr-namespace:SilverlightApplication4;assembly=SilverlightApplication4" d:DesignHeight="300" d:DesignWidth="400"&gt; &lt;core:MainPage&gt; &lt;!-- how do i change the type of child elements?--&gt; &lt;/core:MainPage&gt; &lt;/UserControl&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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