title: UWP : How to use x:bind in ResourceDictionary?
body: <p>I want to use ResourceDictionary in UWP like I used in WPF
  In WPF, I do this in ResourceDictionary file(*Style.xaml)</p>
  
  <pre><code>&lt;ResourceDictionary 
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
      xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
      xmlns:models="using:NWP.Models"&gt;
  
  &lt;Style x:key="MenuContent" TargetType="ContentControl"&gt;
      &lt;Setter Property="Template"&gt;
      &lt;Setter.Value&gt;
          &lt;ControlTemplate TargetType="ContentControl"&gt;
              &lt;controls:DockPanel&gt;
                  &lt;ItemsControl ItemsSource="{x:Bind How-Can-I-Bind-Collection-Here?}"&gt;
                      &lt;ItemsControl.ItemTemplate&gt;
                          &lt;DataTemplate x:DataType="models:MenuItemModel"&gt;
                              &lt;RadioButton GroupName="MenuItems" IsChecked="{x:Binding IsChecked, Mode=TwoWay}" MinHeight="0" MinWidth="0" Command="{Binding Command}" CommandParameter="{Binding}"/&gt;
                          &lt;/DataTemplate&gt;
                      &lt;/ItemsControl.ItemTemplate&gt;
                      &lt;ItemsControl.ItemsPanel&gt;
                          &lt;ItemsPanelTemplate&gt;
                              &lt;StackPanel Orientation="Horizontal"/&gt;
                          &lt;/ItemsPanelTemplate&gt;
                      &lt;/ItemsControl.ItemsPanel&gt;
                  &lt;/ItemsControl&gt;
  
                  &lt;ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentTransitions="{TemplateBinding ContentTransitions}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/&gt;
              &lt;/controls:DockPanel&gt;
          &lt;/ControlTemplate&gt;
      &lt;/Setter.Value&gt;
  &lt;/Style&gt;
  
  &lt;/ResourceDictionary&gt;
  </code></pre>
  
  <p>Then I can use this style in my Page:</p>
  
  <pre><code>&lt;ContentControl Style="{StaticResource MenuContent}"&gt;
      &lt;StackPanel Orientation="Vertical"&gt;
          &lt;TextBox/&gt;
          &lt;PasswordBox/&gt;
          &lt;Button Content="Login"/&gt;
      &lt;/StackPanel&gt;
  &lt;/ContentControl&gt;
  </code></pre>
  
  <p>But now, I struggle on how to provide the source for ItemsSource in ItemsControl in ResourceDictionary with x:bind:</p>
  
  <pre><code>&lt;ItemsControl ItemsSource="{x:Bind How-Can-I-Bind-Collection-Here?}"&gt;
  </code></pre>
  
  <p>My question is, how to solve this problem?</p>