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

Fluent:RibbonProperties.TitleBarHeight="0" no longer works! #49

Closed
jonferreira opened this issue Jan 9, 2015 · 10 comments
Closed

Fluent:RibbonProperties.TitleBarHeight="0" no longer works! #49

jonferreira opened this issue Jan 9, 2015 · 10 comments
Assignees
Labels
Milestone

Comments

@jonferreira
Copy link

Hi,

Seems like after upgrading to 3.2 i can no longer have a TitleBarHeight = 0 because a MinTitleBarHeight=25 was introduced...

What am i suppose to do if i don't want Fluent to manage my TitleBar? (I'm using MahApps)

Thanks

@batzen
Copy link
Member

batzen commented Jan 12, 2015

Could you send me a sample which demonstrates your usage?
Then i can include it in the showcase application to avoid such issues in the future.

@jonferreira
Copy link
Author

The following is enough to create a fancy window merging MahApps and Fluent

<Metro:MetroWindow x:Class="XPTO.Views.MainWindowView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Fluent="clr-namespace:Fluent;assembly=Fluent"
    xmlns:Metro="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
    xmlns:Dialog="clr-namespace:MahApps.Metro.Controls.Dialogs;assembly=MahApps.Metro"
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    xmlns:cal="http://www.caliburnproject.org"
    Fluent:RibbonProperties.TitleBarHeight="0"
    Style="{DynamicResource CleanWindowStyleKey}"
    GlowBrush="{DynamicResource AccentColorBrush}"
    ShowIconOnTitleBar="False"
    ShowTitleBar="True"
    WindowStartupLocation="CenterScreen"
    Title="{Binding Path=NomeAplicacao}" 
    Height="506" 
    Width="828" 
    x:Name="MainWindow"
    TitleCaps="False" 
    cal:Message.Attach="[Event Closing] = [Action Close($eventArgs,$view)]" 
    WindowState="Maximized"
    >

However i now have 2 title bars (one from MahApps and other from Fluent)

Image of Bug

I can create a sample project if required

Thanks

@jonferreira
Copy link
Author

hi batzen.

any news? can i help on something to speed things up?

@batzen
Copy link
Member

batzen commented Jan 15, 2015

No news so far other than i'm too busy to work on this project currently. Maybe i can find some time this weekend.

@jonferreira
Copy link
Author

sure, totally understandable. thanks for the update

@batzen
Copy link
Member

batzen commented Jan 15, 2015

I just noticed that you got the office user dropdown in your application, would you mind sharing the code for that? Someone else asked for that feature a while back.

@batzen batzen added this to the 3.3.0 milestone Jan 15, 2015
@batzen batzen self-assigned this Jan 15, 2015
@jonferreira
Copy link
Author

pretty sure it was me who asked that :P

https://fluent.codeplex.com/discussions/546793

here is my code although all the issues i had to begin with are still there

<Fluent:DropDownButton 
                        Header="{Binding HeaderUtilizadorNome}"
                        IsEnabled="True"
                        Fluent:RibbonProperties.Size="Middle"

                        VerticalAlignment="Top" Margin="0,0,10,0">

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

                        <!--<Rectangle Width="75" Height="75" Margin="10,10,10,5" Grid.Column="0" Fill="Gray"  />-->
                        <!--<Image Width="75" Height="75" Margin="10,10,10,5" Grid.Column="0" Source="/Resources/user_blank.png" Stretch="Fill" Cursor="Cross"/>-->
                        <Rectangle Width="65" 
                                   Grid.Column="0"
                                   Grid.Row="0"
                                   Height="65"
                                   Margin="5,5,5,5"
                            >
                            <Rectangle.Fill>
                                <VisualBrush Stretch="Fill" Visual="{DynamicResource appbar_user}" />
                            </Rectangle.Fill>
                        </Rectangle>

                        <StackPanel Grid.Column="1" Grid.Row="0">

                            <Label Content="{Binding HeaderUtilizadorNome}" FontWeight="Bold" FontSize="18" Margin="0,10,0,0" ></Label>
                            <Label Content="{Binding HeaderUtilizadorEmail}" FontSize="12" ></Label>

                        </StackPanel>

                        <StackPanel  Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" >
                            <Separator/>
                            <Label Content="Definições da Conta" 
                                   Margin="10,0,0,0" 
                                   Cursor="Hand" 
                                   Foreground="Gray"
                                   Style="{StaticResource HoverUnderlineLabelStyle}"
                                   />
                        </StackPanel>

                        <StackPanel  Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2">
                            <Separator  />
                            <Label Content="Mudar de Conta" 
                                   Margin="10,0,0,5" 
                                   Cursor="Hand" 
                                   Foreground="Gray"
                                   Style="{StaticResource HoverUnderlineLabelStyle}"
                                   >
                                <i:Interaction.Triggers>
                                    <i:EventTrigger EventName="MouseDown">
                                        <cal:ActionMessage MethodName="SistemaReentrarComo">
                                            <cal:Parameter Value="{Binding ElementName=MainWindow}" />
                                        </cal:ActionMessage>
                                    </i:EventTrigger>
                                </i:Interaction.Triggers>
                            </Label>

                        </StackPanel>

                    </Grid>

                </Fluent:DropDownButton>

@batzen
Copy link
Member

batzen commented Jan 30, 2015

Nice it was you. Couldn't connect your usernames ;-)
This issue was fixed a few minutes ago. Will close this one as soon as i made sure that package restore works correctly, as i am now using the MahMetro nuget package to implement the compatibility test window in the showcase application.

@jonferreira
Copy link
Author

thanks batzen.
i can test it as soon as 3.3.0 is released :)

@batzen
Copy link
Member

batzen commented Feb 4, 2015

Will close this as i integrated the MahMetro sample and it looks good.
Feel free to open this issue again after you tested 3.3.0 and found any remaining issues regarding the integration with MahMetro.

@batzen batzen closed this as completed Feb 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants