Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi there how would i insert appbar_xxx (Resource Image) next to Connection and FPS?

XML
<StatusBar x:Name="StatusBar"  Grid.Row="2" >
                <StatusBarItem>Connection</StatusBarItem>
                <Separator Style="{StaticResource MetroStatusBarSeparator}" />
                <StatusBarItem>FPS</StatusBarItem>
            </StatusBar>
Posted
Updated 8-Jan-15 3:10am
v2
Comments
TheRealSteveJudge 8-Jan-15 9:31am    
Do you want to have an image on the right?

Please have a look at the snippet below:
C#
<StatusBar x:Name="StatusBar">
  <StatusBarItem>Connection</StatusBarItem>
  <Separator />
  <StatusBarItem>FPS</StatusBarItem>
  <Separator />                
  <Rectangle Width="13" Height="13" Fill="Red"></Rectangle>
</StatusBar>
 
Share this answer
 
v3
Comments
Nico_Travassos 8-Jan-15 9:48am    
Check my answer something like that but in status bar with text next to it
Nico_Travassos 8-Jan-15 9:54am    
Looks good but how do i add {DynamicResource appbar_smiley_grin}
TheRealSteveJudge 8-Jan-15 9:57am    
OK. This is a different thing. What is "appbar_smiley_grin"?
Nico_Travassos 8-Jan-15 9:58am    
icons i have stored in xaml file
TheRealSteveJudge 8-Jan-15 10:00am    
Then you should also provide its XAML.
No Something like this

XML
<Rectangle Width="13" Height="13" Fill="{Binding Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}">
                <Rectangle.OpacityMask>
                    <VisualBrush Stretch="Fill" Visual="{DynamicResource appbar_smiley_grin}" />
                </Rectangle.OpacityMask>
            </Rectangle>
 
Share this answer
 
Comments
Nico_Travassos 8-Jan-15 9:50am    
cant see the code?
TheRealSteveJudge 8-Jan-15 9:52am    
Sorry. It was suppressed by the commenting function.
Please see updated Solution 1.

By the way: Do not post your own solutions.
Use the commenting function instead.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900