所以我一直在谷歌上搜索网页和电子书。
我有一个 DatePicker,我想绑定它以在每个 xml 行中搜索相应的日期,并将行内的 Place 和 Special 这两个字段显示到 MainPage 上的预设 TextBoxes 中。
有什么建议么?
主页.xaml
<UserControl
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"
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
x:Class="SilverlightApplication6.MainPage"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<Grid x:Name="LayoutRoot" Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="33*"/>
<ColumnDefinition Width="367*"/>
</Grid.ColumnDefinitions>
<StackPanel HorizontalAlignment="Left" Height="100" Margin="106.164,25,0,0"
VerticalAlignment="Top" Width="100" Grid.Column="1">
<sdk:DatePicker Height="23" Width="120"/>
</StackPanel>
<TextBlock HorizontalAlignment="Left" Margin="0,75,0,0" TextWrapping="Wrap"
Text="TextBlock" VerticalAlignment="Top" Grid.Column="1"/>
<TextBlock Grid.Column="1" HorizontalAlignment="Left" Margin="0,96,0,0"
TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top"/>
<TextBlock Grid.Column="1" HorizontalAlignment="Left" Margin="0,157,0,0"
TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top"/>
<TextBlock Grid.Column="1" HorizontalAlignment="Right" Margin="0,178,313,0"
TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top"/>
</Grid>
</UserControl>
菜单.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Menu xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Row>
<Place>Club Del Monte Lunch Specials</Place>
<Start_Date>41428</Start_Date>
<Special>CAF DEL MONTEBBQ Pork RibswithBeans and ColeslawEL PRADO DINING
ROOMMain Entre Choices: Beef EnchiladasPork EnchiladasSide Choices:
Spanish RiceOrRefried BeansandSauted Yellow Squash and ZucchiniSoup of
the Day:Chicken and Rice Caldo Subject to Availability</Special>
</Row>
<Row>
<Place>TRIDENT DINNER SPECIAL: Seafood Cioppino </Place>
<Start_Date>41428</Start_Date>
<Special>With Clams, Mussels, Salmon, Scallops, Crab, Fish and Shrimp.
Served with Garlic Bread $16.00Appetizer:Combination with 3 Wings, 3
Poppers, 3 Chicken Tenders $8.75</Special>
</Row>
<Row>
<Place>Club Del Monte Lunch Specials</Place>
<Start_Date>41429</Start_Date>
<Special>CAF DEL MONTETri Tip SandwichwithColeslawEL PRADO DINING ROOMMain
Entre Choices: Grilled Chicken Breast with Roasted Pepper Cream SauceMeat
LoafSide Choices:Garlic Mashed PotatoesOrStuffingandSteamed Broccoli and
CauliflowerSoup of the Day:Yellow Lentil with Chicken Subject to
Availability</Special>
</Row>
<Row>
<Place>TRIDENT ROOM DINNER SPECIAL: Prime Rib</Place>
<Start_Date>41429</Start_Date>
<Special>Served with Baked Potato, AuJus and Steamed Vegetables $17.00
Appetizer: Shrimp Cocktail $6.50</Special>
</Row>
<Row>
<Place>Club Del Monte Lunch Specials</Place>
<Start_Date>41430</Start_Date>
<Special>CAF DEL MONTEChicken CurryoverRiceEL PRADO DINING ROOMMain Entre
Choices: Grilled Red Snapper with Cucumber RelishSpaghetti with Meat
SauceSide Choices:Roasted Red and Yukon PotatoesandSauted Medley of
VegetablesSoup of the Day:Beef with Vegetables Subject to
Availability</Special>
</Row>
<Row>
<Place>Club Del Monte Lunch Specials</Place>
<Start_Date>41431</Start_Date>
<Special>CAF DEL MONTEPersonalCombination PizzaEL PRADO DINING ROOMMain
Entre Choices: Roasted Pork Loin with Pineapple Ginger SauceSweet and
Sour ChickenSide Choices:Fried RiceandEgg RollsSoup of the Day:Rice with
Vegetables and Ham Subject to Availability</Special>
</Row>
<Row>
<Place>Trident Room Dinner Special</Place>
<Start_Date>41431</Start_Date>
<Special>Seafood Linguini with Clams and Mussels. Served with Garlic
Bread $14.50</Special>
</Row>
</Menu>