Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Apr 13 03:25
    MaxDeBy opened #4078
  • Apr 09 18:36
    Flunx commented #4053
  • Apr 08 08:14
    timunie commented #4065
  • Apr 07 21:13
    derekdd23 commented #4065
  • Apr 01 14:03
    timunie commented #4077
  • Apr 01 13:37
    TripleNico commented #4077
  • Apr 01 12:46
    timunie commented #4077
  • Apr 01 09:25
    TripleNico commented #4077
  • Apr 01 09:13
    timunie commented #4077
  • Apr 01 09:01
    TripleNico labeled #4077
  • Apr 01 09:01
    TripleNico opened #4077
  • Mar 29 11:30
    dnfadmin commented #4076
  • Mar 29 10:23
    dnfadmin commented #4076
  • Mar 29 10:22
    Jan18101997 opened #4076
  • Mar 28 14:21
    NimbusHex commented #4072
  • Mar 28 13:44
    Jan18101997 commented #4072
  • Mar 28 13:31
    NimbusHex commented #4072
  • Mar 28 12:55
    chei-de commented #4072
  • Mar 28 12:20
    chei-de commented #4072
  • Mar 28 12:20
    chei-de commented #4072
TripleNico
@TripleNico
Hi all! Just a quick question. Upon an new Window Show there is a smooth animation going on. Now later on i hide and show รก window but i noticed then when a window was hide than the Show doesn't trigger that animation again. Is there a way to trigger this again?
Tim
@timunie
@TripleNico you can place your whole content in a mah:MetroContentControl which can be used to trigger the animation. but if so I would disable the Property WindowTransitionsEnabled=false on your window
Zeleksonob
@Zeleksonob

Hi guys ,
I'm trying modifiy the path height and width (polygon up/polygon down)of numeric up and down
using https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit/blob/master/MaterialDesignThemes.MahApps/Themes/MaterialDesignTheme.MahApps.NumericUpDown.xaml

how can I override this property in my xaml ?

Jan Karger ใƒ„ โ˜€
@punker76
@Zeleksonob Currently there is no simple way to do this. For now you must take the template and replace the path. I have a change in the pipeline to make this easier.
Zeleksonob
@Zeleksonob
so there mo way to control the height of the buttons ?
*easy way
Tim
@timunie
@Zeleksonob not now but planned. But tbh replacing a template is not that hard in WPF. If you never did it its a good first try ๐Ÿค“
Happy coding
jorrr1
@jorrr1:matrix.org
[m]

Hello all, t is possible enable change position my program by click on bar with program title when MessageBox show? Because when this command execute, I can't click to move my program in other position. I use MahApps.Metro.

MetroWindow metroWindow = (Application.Current.MainWindow as MetroWindow);
MessageDialogResult dialogResult = metroWindow.ShowModalMessageExternal("Title", "Message", MessageDialogStyle.AffirmativeAndNegative);

Tim
@timunie
Hi @jorrr1:matrix.org
You can try this on your MetroWindow: ShowDialogsOverTitleBar="False"
jorrr1
@jorrr1:matrix.org
[m]
Thanks for help @timunie and I have next question, this ModelMessageExternal I can set same style like MessageAsync? Because ModelMessageExternal hide program and MessageAsync work async and run other command and I would like the next command to be called only after clicking "ok".
Tim
@timunie
@jorrr1:matrix.org ?
MessageAsync work async and run other command and I would like the next command to be called only after clicking "ok".
If you call if (await ShowMessageAsync(...) == MessageResult.OK) { run your stuff here } it should do one by one.
jorrr1
@jorrr1:matrix.org
[m]
Does it have to include await ? Because it forces me to do an asynchronous method.
With ModelMessageExternal I mean that it is displayed on the whole screen of the program and hide all with title bar, and MessageAsync only on a certain height
Tim
@timunie
Yes it has to include await. Else you block the UI.
That is how it works tbh.
sgamescz
@sgamescz
Hi everybody. I dont know, if my question belongs here or it is general C# question, but :
            var currentWindow = this.TryFindParent<MetroWindow>();
            var controller = await currentWindow.ShowProgressAsync(SORGAIR.Properties.Lang.Lang.home_load_caption, SORGAIR.Properties.Lang.Lang.home_load_caption);

            controller.SetProgress(0.1);
            controller.SetMessage("BLABLABLA");
its possible to set message via binding ?
because if i call ShowProgressAsync , and in background call big function that call many sub-functions i need update in this ShowProgressAsync updates manytimes message
and controller.SetMessage(OTHERMODULE.TEXTTOSHOW); show it only once (logically). and OnPropertyChanged("TEXTTOSHOW"); not rewrite this value on my controller.
Tim
@timunie
You can call setmessage over and over again
If you pass the controller as a parameter also from your sub.
sgamescz
@sgamescz
@timunie thanks, it is better idea :) its working.
TripleNico
@TripleNico

@TripleNico you can place your whole content in a mah:MetroContentControl which can be used to trigger the animation. but if so I would disable the Property WindowTransitionsEnabled=false on your window

Thanks, work like a charm!

Another question, how would one use the DataGridComboBoxColumn ?

Another question, how would one use the DataGridComboBoxColumn ?

Sorry, let me rephrase: Currently i have this:

                <DataGridComboBoxColumn
                    Header="Rol"
                    ItemsSource="{Binding Source={local:EnumBindingSource {x:Type local:UserRole}}}"
                    SelectedItemBinding="{Binding Role, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                    SelectedValueBinding="{Binding Role, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
Which does work but i want the ComboBox to stretch the full column width. But i have also this set: ColumnWidth="*"

and:

<Style BasedOn="{StaticResource MahApps.Styles.DataGridCell}" TargetType="{x:Type DataGridCell}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Grid Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

And last but not least, how to set the Fontsize of DataGridComboBoxColumn?
Tim
@timunie
@TripleNico if you set HorizontalAlignment="Center" it will not stretch the contnet. ๐Ÿคทโ€โ™‚๏ธ
Set HorizontalAlignment="Stretch"
And last but not least, how to set the Fontsize of DataGridComboBoxColumn?
You can use ElementStyle and EditingElementStyle I think. ๐Ÿค”
Rohan D'Sa
@goldcode
image.png
@timunie regarding the virtualization issues, you had mentioned about grouping in listview. i got the impression the virtualization was also disabled there.
normally snoop only shows as many items as there are on the screen when virtualization is enabled.
i wanted to use treeview, then i realized the data (tree children) i want to show is actually more than just a string field. it is a bunch of fields which should be formatted in a grid like manner. so i actually require a listview gridview format.
Tim
@timunie
VirtualizingPanel.IsVirtualizingWhenGrouping="True"
Did you set the above property?
Rohan D'Sa
@goldcode
i ran your code on my VS. also i see that its done here <Style x:Key="MahApps.Styles.ListView.Virtualized" BasedOn="{StaticResource MahApps.Styles.ListView}" TargetType="{x:Type ListView}">
<Setter Property="CanContentScroll" Value="True" />
<Setter Property="IsDeferredScrollingEnabled" Value="True" />
<Setter Property="IsVirtualizing" Value="True" />
<Setter Property="IsVirtualizingWhenGrouping" Value="True" />
<Setter Property="VirtualizationMode" Value="Recycling" />
</Style>
Tim
@timunie
Ok the point is it runs on my side lets say fluid enough. So I don't care about the underlying things. I did not learn programming professionally, so I can't give more support here.
Maybe someone on StackOverlow can help or it is written in the MS Docs?
Tim
@timunie
One last word if this really matters for you. WPF is open source now and you can browse the code. So you can really see what is happening behind the scenes.
Rohan D'Sa
@goldcode
@timunie thanks still for the help. just wanted to give feedback after the trouble you took to help me. just so that you know im using your colorpicker in production code! :)
Tim
@timunie
๐Ÿฅณ๐Ÿ’™