ExclamationSolvedXAML Code Problem

Posts 1–7 of 7 · Page 1 of 1
XAML Code Problem
Well, it's official, both Microsoft and I are stupid. My problem is, I was doing a tutorial on how to make an app for windows 8, which has this new feature to use like, 7 different types of code in a single app if you want, and it said to insert this:
 
XAML Controls and content code
<Page
x:Class="WindowsBlogReader.MainPage"
IsTabStop="false"
xmlns="Error"
xmlns:x="Error"
xmlns:local="using:WindowsBlogReader"
xmlns:d="Error"
xmlns:mc="http://schemas.openxmlformats.org/ma...atibility/2006"
mc:Ignorable="d">
<Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
<Grid****wDefinitions>
<RowDefinition Height="140" />
<RowDefinition Height="*" />
</Grid****wDefinitions>
<!-- Title -->
<TextBlock x:Name="TitleText" Text="{Binding Title}"
VerticalAlignment="Center" FontSize="48" Margin="56,0,0,0"/>
<!-- Content -->
<Grid Grid****w="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*" MinWidth="320" />
<ColumnDefinition Width="3*" />
</Grid.ColumnDefinitions>
<!-- Left column -->
<!-- The default value of Grid.Column is 0, so we do not need to set it
to make the ListView show up in the first column. -->
<ListView x:Name="ItemListView"
ItemsSource="{Binding Items}"
Margin="60,0,0,10">
</ListView>
<!-- Right column -->
<!-- We use a Grid here instead of a StackPanel so that the WebView sizes correctly. -->
<Grid DataContext="{Binding ElementName=ItemListView, Path=SelectedItem}"
Grid.Column="1" Margin="25,0,0,0">
<Grid****wDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid****wDefinitions>
<TextBlock x:Name="PostTitleText" Text="{Binding Title}" FontSize="24"/>
<WebView x:Name="ContentView" Grid****w="1" Margin="0,5,20,20"/>
</Grid>
</Grid>
</Grid>
</Page>
into this:
 
Mainpage.xaml
PublicNotInheritableClassMainPage

InheritsPage

ProtectedOverridesAsyncSub OnNavigatedTo(e As Navigation.NavigationEventArgs)

Dim feedDataSource = DirectCast(App.Current.Resources("feedDataSource"), FeedDataSource)


If feedDataSource IsNotNothingThen

If feedDataSource.Feeds.Count = 0 Then

Await feedDataSource.GetFeedsAsync()

EndIf

Me.DataContext = (feedDataSource.Feeds).First()

EndIf

EndSub

EndClass
and I got back 49 errors from the controls and content part itself when I hit build solution, can someone help?

---------- Post added at 09:45 PM ---------- Previous post was at 09:01 PM ----------

I have no idea on what you are trying to do, but are you typing VB code into a XML file? Well i dont see that compiling =\
that's the retard thing about windows 8, now, in order for any app to work, you have to know XML and another type, vb was just the easiest for the job, because each part has to be a different coding for metro style, you can check the windows blog yourself, i'm doing exactally what it says
Its pretty much WPF instead of windows forms I guess?
That's not retarded about Microsoft or anyone else. You're completely doing it wrong. You are copying XAML controls and content code into MainPage.vb instead of MainPage.XAML. You need to copy the code in the correct file. XAML file is used for the layout and .vb file is used for adding logic. This is the core approach in all WPF based applications.
thought i was being retarded, thanks sooooo much, but tbh, the mainpage.xaml gives me a view of what it looks like, wanna screenshot it for me? already thanking and rep+
No problem, and marked solved.
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?