Note that there are some explanatory texts on larger screens.

plurals
  1. POCombobox Binding in Windows Store using Caliburn
    primarykey
    data
    text
    <p>I'm trying to bind a combobox using Caliburn and the following code:</p> <p><em><strong>yyyView.xaml</em></strong></p> <pre><code> &lt;ComboBox x:Name="Filters"&gt;&lt;/ComboBox&gt; </code></pre> <p><em><strong>yyyViewModel.xaml</em></strong></p> <pre><code>private string selectedFilter; public BindableCollection&lt;string&gt; Filters { get { return new BindableCollection&lt;string&gt;( new string[]{ "All", "Last Month", "Last Week", "Yesterday" }); } } public string SelectedFilter { get { return selectedFilter; } set { selectedFilter = value; NotifyOfPropertyChange(() =&gt; SelectedFilter); } } </code></pre> <p>Using this code, I'm getting an <strong><em>ArgumentNullException</em></strong> on <strong><em>App.xaml.cs</em></strong> on the <strong><em>GetInstance</em></strong> method.</p> <p>I'm new to MVVM, Caliburn and XAML, but I've read somewhere there were some kind of behaviors (<strong>Blend Behaviors</strong>, I believe) dropped in WinRT development.</p> <p>Is that the problem? How can I solve this?</p> <p>Thank you</p> <p>EDIT:</p> <p><em><strong>App.xaml.cs</em></strong></p> <pre><code>protected override void Configure() { LogManager.GetLog = type =&gt; new DebugLogger(type); container = new WinRTContainer(); container.RegisterWinRTServices(); container.PerRequest&lt;aaaViewModel&gt;(); container.PerRequest&lt;xxxViewModel&gt;(); container.PerRequest&lt;yyyViewModel&gt;(); container.PerRequest&lt;zzzViewModel&gt;(); } </code></pre> <p><em><strong>App.xaml</em></strong></p> <pre><code>&lt;caliburn:CaliburnApplication x:Class="yyyStoreApp.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:yyyApp" xmlns:caliburn="using:Caliburn.Micro" xmlns:converters="using:yyyApp.Converters" RequestedTheme="Light"&gt; &lt;Application.Resources&gt; &lt;ResourceDictionary&gt; &lt;ResourceDictionary.MergedDictionaries&gt; &lt;ResourceDictionary Source="Resources/CustomStyles.xaml" /&gt; &lt;ResourceDictionary Source="Resources/StandardStyles.xaml"/&gt; &lt;/ResourceDictionary.MergedDictionaries&gt; &lt;converters:ImageFilePathConverter x:Key="ImageFilePath"/&gt; &lt;/ResourceDictionary&gt; &lt;/Application.Resources&gt; &lt;/caliburn:CaliburnApplication&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
 

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