Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the issue: "Applications built using Odyssey's RibbonBar crash when switching users on W10" #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GrosPoulet
Copy link

@GrosPoulet GrosPoulet commented Jan 17, 2020

The "This Freezable cannot be frozen" exception was caused by using
DynamicRessource on a <DrawingImage>. Static ressource must be used
instead:

<DrawingImage x:Key="{ComponentResourceKey odc:Skins, UpArrowImage}" RenderOptions.BitmapScalingMode="HighQuality"> <DrawingImage.Drawing> <DrawingGroup> <GeometryDrawing Geometry="M5,3 L 3,1 L1,3 Z"> <GeometryDrawing.Pen> <Pen Brush="{DynamicResource {ComponentResourceKey odc:Skins, LightBorderBrush}}" Thickness="1" /> </GeometryDrawing.Pen> </GeometryDrawing> <GeometryDrawing Geometry="M4,2 L 2,0 L0,2 Z" Brush="{DynamicResource {ComponentResourceKey odc:Skins, RibbonForegroundBrush}}"> <GeometryDrawing.Pen> <Pen Brush="{DynamicResource {ComponentResourceKey odc:Skins, RibbonForegroundBrush}}" Thickness="1" /> </GeometryDrawing.Pen> </GeometryDrawing> </DrawingGroup> </DrawingImage.Drawing> </DrawingImage>

Here brush properties are set by dynamic ressources, so they must be set statically:

<Pen Brush="{DynamicResource {ComponentResourceKey odc:Skins, LightBorderBrush}}" Thickness="1" />

must be replaced by:

<Pen Brush="Black" Thickness="1" />

…en switching users on W10"

The "This Freezable cannot be frozen" exception was caused by using
DynamicRessource on a <DrawingImage>. Static ressource must be used
instead. For instance:

<DrawingImage x:Key="{ComponentResourceKey odc:Skins, UpArrowImage}"
RenderOptions.BitmapScalingMode="HighQuality">

<DrawingImage.Drawing>

<DrawingGroup>

<GeometryDrawing Geometry="M5,3 L 3,1 L1,3 Z">

<GeometryDrawing.Pen>

<Pen Brush="{DynamicResource {ComponentResourceKey odc:Skins,
LightBorderBrush}}" Thickness="1" />

</GeometryDrawing.Pen>

</GeometryDrawing>

<GeometryDrawing Geometry="M4,2 L 2,0 L0,2 Z"

Brush="{DynamicResource {ComponentResourceKey odc:Skins,
RibbonForegroundBrush}}">

<GeometryDrawing.Pen>

<Pen Brush="{DynamicResource {ComponentResourceKey odc:Skins,
RibbonForegroundBrush}}"

Thickness="1" />

</GeometryDrawing.Pen>

</GeometryDrawing>

</DrawingGroup>

</DrawingImage.Drawing>

</DrawingImage>

Here brush properties are set by dynamic ressources, so they must be set
statically.

For instance:

<Pen Brush="{DynamicResource {ComponentResourceKey odc:Skins,
LightBorderBrush}}" Thickness="1" />

must be replaced by:

<Pen Brush="Black" Thickness="1" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant