Style lost when doing autohide to DockablePane

Jun 16, 2010 at 6:43 AM

Hi

 

Am using avalondock version 1.3.3384.0. When am auto hiding style which i applied to inner grid is lost.

any solution for this? below bold style is not apply when auto hide. once pane is fixed style appear back.

         <ad:DockingManager x:Name="DockManager" Grid.Row="0">
            <ad:ResizingPanel Orientation="Horizontal"   >
                <ad:DockablePane ad:ResizingPanel.ResizeWidth="240">
                    <ad:DockableContent Title="Today's Order" IsCloseable="False" DockableStyle="DockableToBorders">
                        <Grid Background="{StaticResource DefaultControlBackgroundBrush}">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="22"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="125"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <dp:DatePicker x:Name="dpTodayOrder" Grid.Row="0" Grid.Column="0" />
                            <dp:DataGrid x:Name="dgOrderGrid" Style="{DynamicResource DataGridDemoStyle}"
                                         Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" GridLinesVisibility="Horizontal"
                                         AutoGenerateColumns="False" Margin="3" IsReadOnly="True"
                                         RowHeight="25">
                                <dp:DataGrid.Columns>
                                    <dp:DataGridTextColumn Width="70" Binding="{Binding DisplayOrderDate}" Header="Time" />
                                    <dp:DataGridTextColumn Width="50" Binding="{Binding OrderUnit}" Header="Unit" />
                                    <dp:DataGridTextColumn Width="*" Binding="{Binding CustomerName}" Header="Customer Name" />
                                </dp:DataGrid.Columns>
                            </dp:DataGrid>
                        </Grid>
                    </ad:DockableContent>
                </ad:DockablePane>
                <ad:DocumentPane>
                    <ad:DocumentContent x:Name="dcAvailable" Title="Available" IsCloseable="False" Background="Transparent"  >
                        <dp:DataGrid x:Name="dgAvailableTruck" AutoGenerateColumns="False" GridLinesVisibility="Horizontal"
                                    Margin="3" IsReadOnly="True" SelectionMode="Single" Style="{DynamicResource DataGridDemoStyle}"
                                    RowHeight="50" AllowDrop="True" RowDetailsVisibilityMode="Visible" >
                            <dp:DataGrid.Columns>
                                <dp:DataGridTemplateColumn Header="Image" Width="50">
                                    <dp:DataGridTemplateColumn.CellTemplate>
                                        <DataTemplate>
                                            <Image Source="{Binding ImagePath, Converter={StaticResource ImgConvert}}"/>
                                        </DataTemplate>
                                    </dp:DataGridTemplateColumn.CellTemplate>
                                </dp:DataGridTemplateColumn>
                                <dp:DataGridTextColumn Width="100" Binding="{Binding TruckName}" Header="Truck Name" />
                                <dp:DataGridTextColumn Width="125" Binding="{Binding CapacityUnit}" Header="Unit Capacity" />
                                <dp:DataGridTextColumn Width="*" Binding="{Binding Location}" Header="Location" />
                            </dp:DataGrid.Columns>
                            <dp:DataGrid.RowDetailsTemplate>
                                <DataTemplate>
                                    <dp:DataGrid x:Name="dgTruckOrderDetail"
                                                 AutoGenerateColumns="False"
                                                 GridLinesVisibility="None"
                                                 Margin="50,3,0,10" IsReadOnly="True" Style="{DynamicResource DataGridDemoStyle}"
                                                 SelectionMode="Extended" RowHeight="22" AllowDrop="True">
                                        <dp:DataGrid.Columns>
                                            <dp:DataGridTextColumn Width="100" Binding="{Binding OrderID}" Header="Order ID" />
                                            <dp:DataGridTextColumn Width="125" Binding="{Binding DisplayOrderDate}" Header="Order Date" />
                                            <dp:DataGridTextColumn Width="150" Binding="{Binding CustomerName}" Header="Customer Name" />
                                            <dp:DataGridTextColumn Width="70" Binding="{Binding OrderUnit}" Header="Order Unit" />
                                        </dp:DataGrid.Columns>
                                    </dp:DataGrid>
                                </DataTemplate>
                            </dp:DataGrid.RowDetailsTemplate>
                        </dp:DataGrid>
                    </ad:DocumentContent>
                </ad:DocumentPane>
            </ad:ResizingPanel>
           
        </ad:DockingManager>

 

Thanks in Advance

Jun 16, 2010 at 9:47 AM
Could you please ensure that resources you're referencing are application level resources?
in autohide mode contents are moved to a different window so resources must be accessible from there.
Ado

From: [email removed]
Sent: Wednesday, June 16, 2010 7:43 AM
To: [email removed]
Subject: Style lost when doing autohide to DockablePane [AvalonDock:216165]

From: snehal14283

Hi

Am using avalondock version 1.3.3384.0. When am auto hiding style which i applied to inner grid is lost.

any solution for this? below bold style is not apply when auto hide. once pane is fixed style appear back.

<ad:DockingManager x:Name="DockManager" Grid.Row="0">
<ad:ResizingPanel Orientation="Horizontal" >
<ad:DockablePane ad:ResizingPanel.ResizeWidth="240">
<ad:DockableContent Title="Today's Order" IsCloseable="False" DockableStyle="DockableToBorders">
<Grid Background="{StaticResource DefaultControlBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="22"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="125"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<dp:DatePicker x:Name="dpTodayOrder" Grid.Row="0" Grid.Column="0" />
<dp:DataGrid x:Name="dgOrderGrid" Style="{DynamicResource DataGridDemoStyle}"
Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" GridLinesVisibility="Horizontal"
AutoGenerateColumns="False" Margin="3" IsReadOnly="True"
RowHeight="25">
<dp:DataGrid.Columns>
<dp:DataGridTextColumn Width="70" Binding="{Binding DisplayOrderDate}" Header="Time" />
<dp:DataGridTextColumn Width="50" Binding="{Binding OrderUnit}" Header="Unit" />
<dp:DataGridTextColumn Width="*" Binding="{Binding CustomerName}" Header="Customer Name" />
</dp:DataGrid.Columns>
</dp:DataGrid>
</Grid>
</ad:DockableContent>
</ad:DockablePane>
<ad:DocumentPane>
<ad:DocumentContent x:Name="dcAvailable" Title="Available" IsCloseable="False" Background="Transparent" >
<dp:DataGrid x:Name="dgAvailableTruck" AutoGenerateColumns="False" GridLinesVisibility="Horizontal"
Margin="3" IsReadOnly="True" SelectionMode="Single" Style="{DynamicResource DataGridDemoStyle}"
RowHeight="50" AllowDrop="True" RowDetailsVisibilityMode="Visible" >
<dp:DataGrid.Columns>
<dp:DataGridTemplateColumn Header="Image" Width="50">
<dp:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Image Source="{Binding ImagePath, Converter={StaticResource ImgConvert}}"/>
</DataTemplate>
</dp:DataGridTemplateColumn.CellTemplate>
</dp:DataGridTemplateColumn>
<dp:DataGridTextColumn Width="100" Binding="{Binding TruckName}" Header="Truck Name" />
<dp:DataGridTextColumn Width="125" Binding="{Binding CapacityUnit}" Header="Unit Capacity" />
<dp:DataGridTextColumn Width="*" Binding="{Binding Location}" Header="Location" />
</dp:DataGrid.Columns>
<dp:DataGrid.RowDetailsTemplate>
<DataTemplate>
<dp:DataGrid x:Name="dgTruckOrderDetail"
AutoGenerateColumns="False"
GridLinesVisibility="None"
Margin="50,3,0,10" IsReadOnly="True" Style="{DynamicResource DataGridDemoStyle}"
SelectionMode="Extended" RowHeight="22" AllowDrop="True">
<dp:DataGrid.Columns>
<dp:DataGridTextColumn Width="100" Binding="{Binding OrderID}" Header="Order ID" />
<dp:DataGridTextColumn Width="125" Binding="{Binding DisplayOrderDate}" Header="Order Date" />
<dp:DataGridTextColumn Width="150" Binding="{Binding CustomerName}" Header="Customer Name" />
<dp:DataGridTextColumn Width="70" Binding="{Binding OrderUnit}" Header="Order Unit" />
</dp:DataGrid.Columns>
</dp:DataGrid>
</DataTemplate>
</dp:DataGrid.RowDetailsTemplate>
</dp:DataGrid>
</ad:DocumentContent>
</ad:DocumentPane>
</ad:ResizingPanel>

</ad:DockingManager>

Thanks in Advance

Jun 16, 2010 at 12:32 PM

Thank you very much. I used windows resource thats why not coming

 

Thanks Once again....!!!