Click here to Skip to main content
15,881,833 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Passing table value params to Sql Server from WPF app Pin
Richard Deeming5-Mar-18 8:23
mveRichard Deeming5-Mar-18 8:23 
GeneralRe: Passing table value params to Sql Server from WPF app Pin
Christopher Duncan5-Mar-18 11:03
Christopher Duncan5-Mar-18 11:03 
GeneralRe: Passing table value params to Sql Server from WPF app Pin
Richard Deeming5-Mar-18 12:35
mveRichard Deeming5-Mar-18 12:35 
GeneralRe: Passing table value params to Sql Server from WPF app Pin
Christopher Duncan6-Mar-18 0:43
Christopher Duncan6-Mar-18 0:43 
GeneralRe: Passing table value params to Sql Server from WPF app Pin
Christopher Duncan6-Mar-18 1:23
Christopher Duncan6-Mar-18 1:23 
GeneralRe: Passing table value params to Sql Server from WPF app Pin
Richard Deeming6-Mar-18 1:29
mveRichard Deeming6-Mar-18 1:29 
GeneralRe: Passing table value params to Sql Server from WPF app Pin
Christopher Duncan6-Mar-18 1:32
Christopher Duncan6-Mar-18 1:32 
QuestionScrollbars Not Enabling Pin
Kevin Marois1-Mar-18 5:52
professionalKevin Marois1-Mar-18 5:52 
I have a grid with two expanders in it. See this and this

When I resize the window and make it smaller, the tree's scrollbar does not come on. See this

When I set the Row Definitions to
<Grid.RowDefinitions>
    <RowDefinition Height="Auto"/>
    <RowDefinition Height="*"/>
    <RowDefinition Height="*"/>
</Grid.RowDefinitions>
I get this.

When I resize the window smaller the tree resizes correctly so the scrollbar now shows. Here

The problem is that now the expanders are separated instead of stacked.

Here is the XAML - It's a lot, so bear with me I'm desperate!!
<Grid Grid.Row="2"
      Grid.Column="0"
      Margin="3"
      MinWidth="225"
      Visibility="{Binding Path=IsUserLoggedIn, Converter={StaticResource BoolToVisConverter}}">

    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*"/>
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="*"/>
        <RowDefinition Height="*"/>
    </Grid.RowDefinitions>

    <!SEARCH>
    <Grid Grid.Row="0"
          Grid.Column="0"
          Background="{StaticResource brushWatermarkBackground}"
          Style="{StaticResource searchFieldStyle}"
          Margin="2">

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>

        <TextBlock Grid.Column="0"
                   Margin="5,2"
                   Text="Click here to search "
                   Foreground="{StaticResource brushWatermarkForeground}"
                   FontStyle="Italic"
                   FontSize="14">
            <TextBlock.Visibility>
                <MultiBinding Converter="{StaticResource TextInputToVisibilityConverter}">
                    <Binding ElementName="txtUserEntry2"
                                 Path="Text.IsEmpty" />
                    <Binding ElementName="txtUserEntry2"
                                 Path="IsFocused" />
                </MultiBinding>
            </TextBlock.Visibility>
        </TextBlock>
        <TextBox Grid.Column="0"
                 Name="txtUserEntry2"
                 Background="Transparent"
                 Text="{Binding SearchValue}"
                 FontSize="14"
                 HorizontalAlignment="Stretch">
            <TextBox.InputBindings>
                <KeyBinding Key="Enter" Command="{Binding PeformSearchCommand}"/>
                <KeyBinding Key="Tab" Command="{Binding PeformSearchCommand}"/>
            </TextBox.InputBindings>
        </TextBox>

        <Button Grid.Column="1"
                Height="22"
                Width="22"
                Margin="2"
                ToolTip="Clear Search"
                Command="{Binding ClearSearchCommand}">
            <Image Source="/Jayhawk.UI.WPF;component/Media/Images/clear.png"/>
        </Button>

    </Grid>

    <!PROJECTS>
    <Expander Grid.Row="1"
              Header="Projects"
              Margin="0,0,0,2"
              ScrollViewer.VerticalScrollBarVisibility="Visible"
              IsExpanded="{Binding AreProjectsExpanded, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">

        <Grid VerticalAlignment="Stretch">

            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>

            <!FILTERS>
            <ComboBox Grid.Row="0"
                      ItemsSource="{Binding ProjectFilters}"
                      SelectedItem="{Binding SelectedProjectFilter}">

                <ComboBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <CheckBox IsChecked="{Binding IsSelected}"
                                      Margin="5" />
                            <TextBlock Text="{Binding Caption}"
                                       Margin="5" />
                        </StackPanel>
                    </DataTemplate>
                </ComboBox.ItemTemplate>

            </ComboBox>

            <!SORT OPTIONS>
            <ComboBox Grid.Row="1"
                      ItemsSource="{Binding ProjectSortOptions}"
                      SelectedItem="{Binding SelectedProjectSortOption}">

                <ComboBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding Caption}"
                                       Margin="5" />
                        </StackPanel>
                    </DataTemplate>
                </ComboBox.ItemTemplate>

            </ComboBox>

            <!PROJECT LIST>
            <TreeView Grid.Row="2"
                      ItemsSource="{Binding Projects}"
                      ScrollViewer.VerticalScrollBarVisibility="Visible">

                <TreeView.ItemContainerStyle>
                    <Style TargetType="TreeViewItem">
                        <Setter Property="IsExpanded" Value="{Binding Expanded, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                    </Style>
                </TreeView.ItemContainerStyle>

            </TreeView>

            <!PROGRESS INDICATOR>
            <Grid Grid.Row="2"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Visibility="{Binding ProjectProgressVisible}">

                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>

                <progress:SpinningProgress Grid.Row="0"
                                           Height="54"
                                           Width="65"
                                           Margin="5"/>

                <TextBlock Grid.Row="1"
                           Text="Loading..."
                           HorizontalAlignment="Center"
                           Margin="2"
                           Foreground="SteelBlue"
                           FontSize="18"/>
            </Grid>

        </Grid>

    </Expander>

    <!COMPANIES>
    <Expander Grid.Row="2"
              Header="Companies"
              Margin="0,0,0,2"
              ScrollViewer.VerticalScrollBarVisibility="Visible"
              IsExpanded="{Binding AreCompaniesExpanded}">

        <Grid VerticalAlignment="Top">

            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>

            <Grid Grid.Row="0">

                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>

                <ComboBox ItemsSource="{Binding CompanyFilters}">

                    <ComboBox.ItemTemplate>
                        <DataTemplate>

                            <mctrls:MaroisRadioButton IsChecked="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                      Content="{Binding Caption}"
                                                      GroupName="companyFilters"/>

                        </DataTemplate>
                    </ComboBox.ItemTemplate>

                </ComboBox>

                <Button Grid.Column="1"
                        Height="22"
                        Width="22"
                        Margin="2"
                        ToolTip="Reresh Companies"
                        Command="{Binding RefreshCompaniesCommand}">
                    <Image Source="/Jayhawk.UI.WPF;component/Media/Images/refresh.png"/>
                </Button>

            </Grid>

            <mctrls:MaroisTreeView Grid.Row="1"
                                   ItemsSource="{Binding Companies}"
                                   SelectedItemEx="{Binding SelectedCompany}"
                                   BorderThickness="0"
                                   BorderBrush="Transparent"
                                   ScrollViewer.VerticalScrollBarVisibility="Auto"
                                   Margin="1"/>

            <StackPanel Orientation="Vertical"
                        Grid.Row="1"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Visibility="{Binding CompanyProgressVisible}">

                <progress:SpinningProgress Height="54"
                                           Width="65"
                                           Margin="5"/>

                <TextBlock Text="Loading..."
                           HorizontalAlignment="Center"
                           Margin="2"
                           Foreground="SteelBlue"
                           FontSize="18"/>
            </StackPanel>

        </Grid>

    </Expander>

</Grid>
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

AnswerRe: Scrollbars Not Enabling Pin
Gerry Schmitz2-Mar-18 9:59
mveGerry Schmitz2-Mar-18 9:59 
QuestionHighlight Searched Text with ListView in WPF Pin
Member 1313673327-Feb-18 14:17
Member 1313673327-Feb-18 14:17 
AnswerRe: Highlight Searched Text with ListView in WPF Pin
Richard MacCutchan27-Feb-18 21:26
mveRichard MacCutchan27-Feb-18 21:26 
AnswerRe: Highlight Searched Text with ListView in WPF Pin
Gerry Schmitz28-Feb-18 7:53
mveGerry Schmitz28-Feb-18 7:53 
QuestionWPF memory leak BitmapImage Pin
Leif Simon Goodwin21-Feb-18 1:53
Leif Simon Goodwin21-Feb-18 1:53 
AnswerRe: WPF memory leak BitmapImage Pin
#realJSOP22-Feb-18 1:32
mve#realJSOP22-Feb-18 1:32 
GeneralRe: WPF memory leak BitmapImage Pin
Leif Simon Goodwin22-Feb-18 5:30
Leif Simon Goodwin22-Feb-18 5:30 
AnswerRe: WPF memory leak BitmapImage Pin
MadMyche22-Feb-18 4:09
professionalMadMyche22-Feb-18 4:09 
GeneralRe: WPF memory leak BitmapImage Pin
Leif Simon Goodwin22-Feb-18 5:31
Leif Simon Goodwin22-Feb-18 5:31 
GeneralRe: WPF memory leak BitmapImage Pin
MadMyche22-Feb-18 8:31
professionalMadMyche22-Feb-18 8:31 
GeneralRe: WPF memory leak BitmapImage Pin
Leif Simon Goodwin23-Feb-18 2:36
Leif Simon Goodwin23-Feb-18 2:36 
AnswerRe: WPF memory leak BitmapImage Pin
Gerry Schmitz22-Feb-18 4:46
mveGerry Schmitz22-Feb-18 4:46 
GeneralRe: WPF memory leak BitmapImage Pin
Leif Simon Goodwin22-Feb-18 5:29
Leif Simon Goodwin22-Feb-18 5:29 
GeneralRe: WPF memory leak BitmapImage Pin
Gerry Schmitz22-Feb-18 5:54
mveGerry Schmitz22-Feb-18 5:54 
GeneralRe: WPF memory leak BitmapImage Pin
Leif Simon Goodwin22-Feb-18 23:57
Leif Simon Goodwin22-Feb-18 23:57 
AnswerRe: WPF memory leak BitmapImage Pin
Leif Simon Goodwin8-Mar-18 22:35
Leif Simon Goodwin8-Mar-18 22:35 
Question"Cylinder lens" scrollbar Pin
kalberts19-Feb-18 3:33
kalberts19-Feb-18 3:33 

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.