diff options
-rw-r--r-- | Juick/Classes/ParagraphBindingBehavior.cs | 6 | ||||
-rw-r--r-- | Juick/MainPage.xaml | 19 | ||||
-rw-r--r-- | Juick/ThreadView.xaml | 17 |
3 files changed, 18 insertions, 24 deletions
diff --git a/Juick/Classes/ParagraphBindingBehavior.cs b/Juick/Classes/ParagraphBindingBehavior.cs index 6a05579..524f4db 100644 --- a/Juick/Classes/ParagraphBindingBehavior.cs +++ b/Juick/Classes/ParagraphBindingBehavior.cs @@ -6,6 +6,9 @@ namespace Juick.Classes {
public static class ParagraphBindingBehavior
{
+ public static readonly DependencyProperty AssignedInlinesProperty =
+ DependencyProperty.RegisterAttached("AssignedInlines", typeof(IEnumerable<Inline>), typeof(Paragraph), new PropertyMetadata(null, AssignedInlinesCallback));
+
static void AssignedInlinesCallback(DependencyObject target, DependencyPropertyChangedEventArgs e)
{
var inlines = ((Paragraph)target).Inlines;
@@ -29,8 +32,5 @@ namespace Juick.Classes {
obj.SetValue(AssignedInlinesProperty, value);
}
-
- public static readonly DependencyProperty AssignedInlinesProperty =
- DependencyProperty.RegisterAttached("AssignedInlines", typeof(IEnumerable<Inline>), typeof(Paragraph), new PropertyMetadata(null, AssignedInlinesCallback));
}
}
diff --git a/Juick/MainPage.xaml b/Juick/MainPage.xaml index d8e8742..bd446ed 100644 --- a/Juick/MainPage.xaml +++ b/Juick/MainPage.xaml @@ -15,11 +15,11 @@ Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
shell:SystemTray.IsVisible="False">
- <!--<FrameworkElement.Resources>
+ <phone:PhoneApplicationPage.Resources>
<ResourceDictionary>
<bindings:RichTextConverter x:Key="inlineConverter" />
</ResourceDictionary>
- </FrameworkElement.Resources>-->
+ </phone:PhoneApplicationPage.Resources>
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
@@ -58,16 +58,13 @@ FontFamily="{StaticResource PhoneFontFamilySemiLight}"
FontSize="{StaticResource PhoneFontSizeLarge}"
Style="{StaticResource PhoneTextAccentStyle}" />
+ <!--Style="{StaticResource PhoneTextNormalStyle}"-->
<RichTextBox Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"
- Foreground="{StaticResource PhoneForegroundBrush}"
- Style="{StaticResource PhoneTextNormalStyle}"
- Margin="5,0,5,5" VerticalAlignment="Top"
- TextWrapping="Wrap" HorizontalAlignment="Left"
- IsReadOnly="True">
- <!--<Paragraph bindings:ParagraphBindingBehavior.AssignedInlines="{Binding MessageText, Converter={StaticResource inlineConverter}}" />-->
- <Paragraph>
- <Run Text="{Binding MessageText}"/>
- </Paragraph>
+ TextWrapping="Wrap" HorizontalAlignment="Left"
+ Foreground="{StaticResource PhoneForegroundBrush}"
+ Margin="5,0,5,5" VerticalAlignment="Top"
+ IsReadOnly="True">
+ <Paragraph bindings:ParagraphBindingBehavior.AssignedInlines="{Binding MessageText, Converter={StaticResource inlineConverter}}" />
</RichTextBox>
<Image Source="{Binding Attachment}" Grid.Row="2" Grid.Column="0" Margin="3" Grid.ColumnSpan="2" />
<TextBlock Text="{Binding Status}" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2"
diff --git a/Juick/ThreadView.xaml b/Juick/ThreadView.xaml index 4c2c129..4f622c7 100644 --- a/Juick/ThreadView.xaml +++ b/Juick/ThreadView.xaml @@ -13,12 +13,12 @@ SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
shell:SystemTray.IsVisible="True">
-
- <!--<phone:PhoneApplicationPage.Resources>
+
+ <phone:PhoneApplicationPage.Resources>
<ResourceDictionary>
<bindings:RichTextConverter x:Key="inlineConverter"/>
</ResourceDictionary>
- </phone:PhoneApplicationPage.Resources>-->
+ </phone:PhoneApplicationPage.Resources>
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
@@ -29,7 +29,7 @@ <!--TitlePanel contains the name of the application and page title-->
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
- <TextBlock x:Name="ApplicationTitle" Text="JUICK" Style="{StaticResource PhoneTextNormalStyle}"/>
+ <TextBlock x:Name="ApplicationTitle" Text="JUICK" Style="{StaticResource PhoneTextNormalStyle}"/>
</StackPanel>
<!--ContentPanel - place additional content here-->
@@ -61,16 +61,13 @@ FontFamily="{StaticResource PhoneFontFamilySemiLight}"
FontSize="{StaticResource PhoneFontSizeLarge}"
Style="{StaticResource PhoneTextAccentStyle}" />
+ <!--Style="{StaticResource PhoneTextNormalStyle}"-->
<RichTextBox Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"
Foreground="{StaticResource PhoneForegroundBrush}"
- Style="{StaticResource PhoneTextNormalStyle}"
Margin="5,0,5,5" VerticalAlignment="Top"
TextWrapping="Wrap" HorizontalAlignment="Left"
IsReadOnly="True">
- <!--<Paragraph bindings:ParagraphBindingBehavior.AssignedInlines="{Binding MessageText, Converter={StaticResource inlineConverter}}" />-->
- <Paragraph>
- <Run Text="{Binding MessageText}"/>
- </Paragraph>
+ <Paragraph bindings:ParagraphBindingBehavior.AssignedInlines="{Binding MessageText, Converter={StaticResource inlineConverter}}" />
</RichTextBox>
<Image Source="{Binding Attachment}" Grid.Row="2" Grid.Column="0" Margin="3" Grid.ColumnSpan="2" />
<!-- TextBlock Text="{Binding Status}" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2"
@@ -86,7 +83,7 @@ </ListBox>
</Grid>
</Grid>
-
+
<!--Sample code showing usage of ApplicationBar-->
<!-- phone:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
|