Click here to Skip to main content
15,914,820 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: How does Silverlight find its Web service when the latter is in an assembly? Pin
fjparisIII19-May-10 7:44
fjparisIII19-May-10 7:44 
QuestionHow to get access to main window controls in WPF Pin
Majid Shahabfar17-May-10 5:11
Majid Shahabfar17-May-10 5:11 
AnswerRe: How to get access to main window controls in WPF Pin
Abhinav S17-May-10 17:42
Abhinav S17-May-10 17:42 
GeneralRe: How to get access to main window controls in WPF Pin
Majid Shahabfar18-May-10 9:14
Majid Shahabfar18-May-10 9:14 
QuestionSL3 Resource Dictionaries [SOLVED] Pin
#realJSOP17-May-10 3:50
professional#realJSOP17-May-10 3:50 
AnswerRe: SL3 Resource Dictionaries Pin
Abhinav S17-May-10 7:04
Abhinav S17-May-10 7:04 
GeneralRe: SL3 Resource Dictionaries Pin
#realJSOP17-May-10 7:07
professional#realJSOP17-May-10 7:07 
GeneralRe: SL3 Resource Dictionaries Pin
Abhinav S17-May-10 7:56
Abhinav S17-May-10 7:56 
GeneralRe: SL3 Resource Dictionaries Pin
#realJSOP17-May-10 8:13
professional#realJSOP17-May-10 8:13 
GeneralRe: SL3 Resource Dictionaries Pin
#realJSOP17-May-10 8:55
professional#realJSOP17-May-10 8:55 
GeneralRe: SL3 Resource Dictionaries Pin
Abhinav S17-May-10 16:16
Abhinav S17-May-10 16:16 
GeneralRe: SL3 Resource Dictionaries Pin
blackjack215018-May-10 1:35
blackjack215018-May-10 1:35 
GeneralRe: SL3 Resource Dictionaries Pin
#realJSOP19-May-10 0:09
professional#realJSOP19-May-10 0:09 
QuestionShapes in Rich text box Pin
r i s h a b h s17-May-10 1:46
r i s h a b h s17-May-10 1:46 
AnswerRe: Shapes in Rich text box Pin
r i s h a b h s17-May-10 18:43
r i s h a b h s17-May-10 18:43 
AnswerRe: Shapes in Rich text box Pin
Abhinav S17-May-10 20:00
Abhinav S17-May-10 20:00 
GeneralRe: Shapes in Rich text box Pin
r i s h a b h s18-May-10 6:40
r i s h a b h s18-May-10 6:40 
Questionhow to cache third party images in silverlight . Pin
sandeep.cec14-May-10 22:24
sandeep.cec14-May-10 22:24 
AnswerRe: how to cache third party images in silverlight . Pin
Abhinav S15-May-10 8:09
Abhinav S15-May-10 8:09 
QuestionResizing GridSplitter Pin
kunthavai14-May-10 11:38
kunthavai14-May-10 11:38 
Hi,

I am a beginner in WPF and following Sams WPF in 24 hrs. There is an exercise to do a FontViewer application using grid which displays the list of system fonts and let the user choose any font and view the corresponding font applied on a sample text. I tried using a GRIDSPLITTER which is not resizing at all. Here is the code.

<Window x:Class="FontViewerGrid.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="500" Width="600">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="64*" />
            <RowDefinition Height="310*" />
            <RowDefinition Height="88*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="190.667*" />
            <ColumnDefinition Width="387.333*" />
        </Grid.ColumnDefinitions>
        
            <Border Grid.ColumnSpan="2"
                    CornerRadius="6"
                    BorderThickness="1"
                    BorderBrush="Gray"
                    Background="LightGray"
                    Margin="6 5 6 5">
                <TextBlock Text="Select a font from the list below. You can change the text by typing in the region at the bottom."
                       FontSize="14" TextWrapping="Wrap" VerticalAlignment="Top"/>
            </Border>
            <ListBox x:Name="FontList"
                     Grid.Row="1"
                     Grid.RowSpan="2"
                     ItemsSource="{x:Static Fonts.SystemFontFamilies}" Margin="6,5,6,5"/>
        <GridSplitter Grid.Row="1" Grid.RowSpan="2" 
                      Grid.Column="1"
                      Width="2"
                      Background="Gray"
                      ResizeDirection="Columns"
                      ResizeBehavior="PreviousAndNext" Margin="0,1,0,5" HorizontalAlignment="Left" />
            <TextBox x:Name="SampleText"
                     Grid.Row="2"
                     Grid.Column="1"
                     MinLines="4"
                     Margin="6 5 6 5"
                     TextWrapping="Wrap"
                     ToolTip="Type here to change the preview text">
                The quick brown fox jumps over the lazy dog.
            </TextBox>
        <GridSplitter Grid.Row="1"
                      Grid.Column="1"
                      Width="2"
                      Background="Gray"
                      ResizeBehavior="PreviousAndNext"
                      ResizeDirection="Rows"/>
            <StackPanel Grid.Row="1"
                        Grid.Column="1"
                        Margin="6 5 6 5">
                <TextBlock Text="{Binding ElementName=SampleText, Path=Text}"
                           FontFamily="{Binding ElementName=FontList, Path=SelectedItem}"
                           FontSize="10"
                           TextWrapping="Wrap"
                           Margin="0 0 0 4"/>
                
                <TextBlock Text="{Binding ElementName=SampleText, Path=Text}"
                           FontFamily="{Binding ElementName=FontList, Path=SelectedItem}"
                           FontSize="16"
                           TextWrapping="Wrap"
                           Margin="0 0 0 4"/>
                
                <TextBlock Text="{Binding ElementName=SampleText, Path=Text}"
                           FontFamily="{Binding ElementName=FontList, Path=SelectedItem}"
                           FontSize="24"
                           TextWrapping="Wrap"
                           Margin="0 0 0 4"/>
                
                <TextBlock Text="{Binding ElementName=SampleText, Path=Text}"
                           FontFamily="{Binding ElementName=FontList, Path=SelectedItem}"
                           FontSize="32"
                           TextWrapping="Wrap"
                           Margin="0 0 0 4"/>
            </StackPanel>
        
    </Grid>
</Window>


Please help me in spotting the mistake.
Thanks.
AnswerRe: Resizing GridSplitter Pin
AspDotNetDev14-May-10 12:51
protectorAspDotNetDev14-May-10 12:51 
AnswerRe: Resizing GridSplitter Pin
AspDotNetDev14-May-10 12:56
protectorAspDotNetDev14-May-10 12:56 
GeneralRe: Resizing GridSplitter Pin
kunthavai14-May-10 23:04
kunthavai14-May-10 23:04 
QuestionC# WPF Developer needed in Philadelphia Pin
Ben Cadbury14-May-10 10:24
Ben Cadbury14-May-10 10:24 
AnswerRe: C# WPF Developer needed in Philadelphia Pin
Richard MacCutchan14-May-10 10:27
mveRichard MacCutchan14-May-10 10:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.