-1
XAML:
SilverlightHelloWorld.Deserialize.schedule
XAML:
<TextBlock Text="{Binding Path=CurrentShows}" Grid.Row="1"/>
は、次の出力を生成
<TextBlock Text="{Binding Path=CurrentShows.Today}" Grid.Row="1"/>
も
<TextBlock Text="{Binding Path=CurrentShows.Today.Date}" Grid.Row="1"/>
デバッグモード中にエラーまたは出力が発生します。
Anysuggestions?
OldStatement:
私はここで静かなだけでなく、複雑な例を持っている、 は最高のは、私は私のコードで始めています。
これは私の分離コードです:私が取得しようとしています
Mainpage.xaml.cs
schedule currentshows;
public schedule CurrentShows
{
protected set
{
if (currentshows != value)
{
currentshows = value;
OnPropertyChanged("CurrentShows");
}
}
get
{
return currentshows;
}
}
schedule.cs
[XmlRoot]
public class schedule : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
DayCollection today;
[XmlElement("DAY")]
public DayCollection Today
{
set
{
if (today != value)
{
today = value;
OnPropertyChanged("Today");
}
}
get
{
return today;
}
}
private void OnPropertyChanged(string p)
{
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs(p));
}
}
DayCollection.cs
public class DayCollection : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
ObservableCollection<TimeCollection> timecol;
[XmlElement("time")]
public ObservableCollection<TimeCollection> TimeCol
{
set
{
if (timecol != value)
{
timecol = value;
OnPropertyChanged("TimeCol");
}
}
get
{
return timecol;
}
}
string date;
[XmlAttribute(AttributeName = "attr")]
public string Date
{
set
{
if (date != value)
{
date = value;
OnPropertyChanged("Date");
}
}
get
{
return date;
}
}
private void OnPropertyChanged(string p)
{
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs(p));
}
}
Stringプロパティ "Da私のXaml to Show-Upで "te" しかし、私はちょうど解決策を得ていません。
私はまったく助けに感謝します、ありがとうアドバンス!
最初にやるべきことはデータバインディングのデバッグメッセージを上げている//私は.stack.imgur.com/MF8i5.png次に、出力ウィンドウを再実行して確認し、そこにどのようなエラーがあるかを確認します。 – Will
標準ではありませんか?さて、私はもう一度チェックし、エラーでもそれらをオンにして、それはうまくコンパイルされません。エラーなし、警告なし、何もありません。 – user1021605
実行中はコンパイル中ではありません。 – Will