Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 11:28
    marcosgerene commented #2247
  • 08:42
    database64128 opened #2269
  • 08:03

    Keboo on icons

    Icons update from Azure pipeline (compare)

  • 08:03
    MDIX-SA synchronize #2266
  • 01:19
    icameron opened #2268
  • 00:29
    rickpmartin commented #2125
  • 00:29
    rickpmartin commented #2125
  • 00:19
    rickpmartin commented #2125
  • Mar 07 08:03

    Keboo on icons

    Icons update from Azure pipeline (compare)

  • Mar 07 08:03
    MDIX-SA synchronize #2266
  • Mar 07 01:49
    supershabby opened #2267
  • Mar 06 08:05
    Keboo synchronize #2266
  • Mar 06 08:05

    Keboo on icons

    Icons update from Azure pipeline (compare)

  • Mar 05 08:03
    MDIX-SA opened #2266
  • Mar 05 08:03

    Keboo on icons

    Icons update from Azure pipeline (compare)

  • Mar 05 02:55
    BigBadBleuCheese edited #2265
  • Mar 05 02:53
    BigBadBleuCheese opened #2265
  • Mar 04 21:38
    dannythegreat commented #2247
  • Mar 04 17:52
    HeedfulCrayon commented #2138
  • Mar 04 16:26
    jizc commented #2190
Andrey Nasonov
@Erapchu
@PRobinsom_twitter those buttons commonly used when switching between frames. You need to create two frames and by those buttons just control your root frame. NavigationFrame.Next() or something like this. But i suggest to use Transitions - it much simple and supports MVVM.
1 reply
aayan
@qq987143350
I would like to ask why the progress bar is in a suspended animation state when my background tasks are asynchronous?
ShannonZ
@ShannonZ
image.png
Andrey Nasonov
@Erapchu
@qq987143350 can you provide your code?
Andrey Nasonov
@Erapchu

@PRobinsom_twitter
View:

<md:Transitioner SelectedIndex="{Binding SelectedTransitionIndex}">
<controls:MyUserControl1 />
<controls:MyUserControl2 />
</md:Transitioner>

And you can add AutoApplyTransitionOrigins="True" to enable auto-detect if ripple/transition origin when click on buttons or controls - just animations.

In MyUserControl1 control:

<Button Command={Binding SwitchToSecondFrameCommand} />

In MyUserControl2 control:

<Button Command={Binding SwitchToFirstFrameCommand} />

ViewModel:

private int _selectedTransitionIndex;
public int SelectedTransitionIndex 
{
get => _selectedTransitionIndex;
set 
  {
    _selectedTransitionIndex = value;
    RaisePropertyChanged();
  }
}
private RelayCommand _switchToSecondFrameCommand 
public RelayCommand SwitchToSecondFrameCommand => _switchToSecondFrameCommand ?? (_switchToSecondFrameCommand = new RelayCommand(SwitchToSecond));
private void SwitchToSecond()
{
SelectedTransitionIndex = 1;
}

private RelayCommand _switchToFirstFrameCommand 
public RelayCommand SwitchToFirstFrameCommand => _switchToFirstFrameCommand ?? (_switchToFirstFrameCommand = new RelayCommand(SwitchToFirst));
private void SwitchToFirst()
{
SelectedTransitionIndex = 0;
}

This is minimal set of bindings.
I think need a whole project.

Andrey Nasonov
@Erapchu
@PRobinsom_twitter There's simple transitions example
https://github.com/Erapchu/TransitionsExample
pull, restore nugets and build
pol robinsom
@PRobinsom_twitter
@Erapchu thanks very much .
Amrani
@AmraniRiyad
Hi, I am using the new materialDesign:TextFieldAssist.LeadingIcon on a Textbox. But the Icon is kind of grayed out. Is it possible to have it black like the orignal Icon ?
pol robinsom
@PRobinsom_twitter
@Erapchu yes, i try your example . i got the idea . thank you again
1 reply
Elaias
@Elaias

Hi all!
I just upgraded material design lib from 3.2 to 4.0 and found couple of problems.
First, TextBox control paddings can't be overload by style. That doesn't work:

<Style TargetType="TextBox" BasedOn="{StaticResource MaterialDesignOutlinedTextBox}">
    <Setter Property="Padding" Value="0"/>
</Style>

But it's ok if I just write it right in control like <TextBox Padding="0"/>

Second, and more important, all menu dropdowns become higher. I dunno how to solve this :< Any ideas?
alt

Blue Dot Brigade
@BlueDotBrigade_twitter

I have been really impressed with the Material Design In Xaml toolkit. Well done!

Out of curiosity, is there an easy way to only show the list of options (i.e. the popup) for a ComboBox (IsEditable=True) when the user clicks the arrow button? I would like to avoid having the popup appear, thus hiding the UI, until the user explicitly asks for a list of options.

Any guidance you can provide would be appreciated.

CONTEXT

  • MaterialDesignThemes NuGet package v4.0.0-ci2347
Blue Dot Brigade
@BlueDotBrigade_twitter
I should add that I am using the ComboBox in a WPF application.
Pakistaniboy442
@Pakistaniboy442
Hello
I need help
with the toolkit
it's not compiling
Andrey Nasonov
@Erapchu
@Pakistaniboy442 hello! You need to restore nugets and if no help remove bin and obj folders, then try again
Nguyên Minh Hồ
@honguyenminh
How can i get the color of the checked filter chip checkbox? Or at least how can I calculate that from code behind? Thanks in advance
CharlieWaffle
@CharlieWaffle

Hi @all,
does anyone know how to use a DialogHost on MainWindow's Closing event? I try to show a dialog if there are unsafed changes but nothing happens. No line of code is recognized after the line

var result = await DialogHost.Show("content", "identifier");

The application closes immediately with code 0 and no exception is thrown.
If I grap the task an wait for it, the application hangs.

var t = DialogHost.Show("content", "identifier");
 t.Wait();
var result = t.Result;

Taskstatus is WaitingForActivation and nothing happens.
Any advice?

Pakistaniboy442
@Pakistaniboy442

@Pakistaniboy442 hello! You need to restore nugets and if no help remove bin and obj folders, then try again

thanks if that doesn't work can you send me the compiled source

Pakistaniboy442
@Pakistaniboy442
help
image.png
image.png
image.png
Pakistaniboy442
@Pakistaniboy442
oof
i accedentaly spammed :(
Andrey Nasonov
@Erapchu
@CharlieWaffle hi! You need to set e.Cancel = true. And make closing handler async, then await showing dialog host.
Pakistaniboy442
@Pakistaniboy442
Andrey
Can you send me the toolbox
@Erapchu
Pakistaniboy442
@Pakistaniboy442
also none of the methods you told me worked :(
Blue Dot Brigade
@BlueDotBrigade_twitter

With respect to:

  • Is there an easy way to only show the list of options (i.e. the popup) for a ComboBox (IsEditable=True) when the user clicks the arrow button?

I don't know if this was the original intent, but it appears that:

  1. the toggleButton is higher up in the visual tree than the PART_EditableTextBox
  2. when you turn on toggleButton border you see that the Button takes up the entire width of the ComboBox

As a result, the toggleButton will always intercept mouse events. The solution that worked for me was to shorten the button size, and align to the right.

Andrey Nasonov
@Erapchu
MaterialDesignDemo.zip
@Pakistaniboy442
Pakistaniboy442
@Pakistaniboy442
thx so much
Just
@D3vJust
Is it possible to switch individual components from one's project to the material design or only the entire project?
CharlieWaffle
@CharlieWaffle

@Erapchu : Thanks for your reply, but I think you have got me wrong. Let me explain it in other words.
Following code is doing what I want but shows the very ugly MessageBox:

 private void MainWindowOnClosing(object sender, CancelEventArgs e)
        {
            if (DataContext is MainWindowViewModel dc && dc.HasUnsavedChanges())
            {
                e.Cancel = MessageBox.Show(
                    "Unsaved changes found.\nRevert changes?",
                    "Revert changes?", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.No;
            }
        }

Instead I want to have a Material Design dialog. If I try the following code, no dialog is shown and no break point could be hit after DialogHost.Show(), but application exited with code 0.

        private async void MainWindowOnClosing(object sender, CancelEventArgs e)
        {
            if (DataContext is MainWindowViewModel dc && dc.HasUnsavedChanges())
            {
                 var result = await DialogHost.Show("content", DialogHostNames.ErrorDialogHostName, null, null);
                e.Cancel = true; //<-- Break point is not hit
            }
        }

Maybe it has something to do with the Window because it is about to close but its content is updated. Any ideas? Thanks in advance.

Andrey Nasonov
@Erapchu
@CharlieWaffle
private async void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
    e.Cancel = true;
    var result = await DialogHost.Show(new UserControl1(), "MainWindowDialogHost");
    if (result is bool booleanResult && booleanResult)
    {
        Closing -= Window_Closing;
        Close();
    }
}
Nicole Coppola
@nicoppola
image.png
@Keboo Is there support for NumericUpDown? I'm looking for something like this ^
Kevin B
@Keboo
@nicoppola not built in. You can get something similar with MahApps or via Material Design Extensions
CharlieWaffle
@CharlieWaffle
@Erapchu Thank you very much. It works perfectly.
1 reply
Yancho Harbaliev
@yharbaliev

Hello, all. I am using a MaterialDesignThemes DialogHost as a popup window for a ProgressBar. IsOpen property is binded to a boolean that controls when the DialogHost is opened.

When I start asynchronous method to do some work I am opening the DialogHost to show that the window is busy and at the end of the method I am closing it. The problem is that if I open another window in the meantime and the asynchronous method closes the DialogHost focus is stolen from the new window I am working on. Strange thing is that this doesn't occur if the application is started in debug mode.

<DialogHost IsOpen="{Binding IsOpenProperty}">
    <DialogHost.DialogContent>
        <ProgressBar/>
    </DialogHost.DialogContent>
<DialogHost/>
private async void DoSomeWorkAsync()
{
    IsOpenProperty = true;

    // Doing some work

    IsOpenProperty = false;
}

Do you know why is this happening and how it could be fixed?

Jesper Hansen
@jespersh
@yharbaliev this is intentional as to restore the focus when dialoghosts close
ahhirca
@ahhirca
Hi all, I'm using CommonOpenFileDialog bound on a button which is on a popup window while a popup is enabled if user select file from dialog it's losing focus (* i mean it's closing). Does anyone know how can I solve it? Thank you. Regards.
Andrey Nasonov
@Erapchu
@ahhirca hello. Can you try to set CloseOnClickAway to dialog host?
ahhirca
@ahhirca
@Erapchu hi. Sorry I'm a newbie my code is like below in UserControl do you recommend putting it in DialogHost?
ahhirca
@ahhirca
This message was deleted
@Erapchu
                                <StackPanel Orientation="Horizontal">
                                    <Button Command="{Binding LoadDatabaseCommand}"
                                            Margin="0 0 10 0"
                                            HorizontalAlignment="Stretch"
                                            Style="{StaticResource MaterialDesignFlatAccentBgButton}"
                                            Content="LOAD DATABASE" />
                                    <StackPanel VerticalAlignment="Center">
                                        <materialDesign:PopupBox Padding="0"
                                                                 StaysOpen="True">
                                            <materialDesign:PopupBox.ToggleContent>
                                                <!--<materialDesign:ColorZone Mode="Accent"
                                                                          CornerRadius="5"
                                                                          Padding="8 4 8 4 ">
                                                    <StackPanel Margin="0 0 8 0"
                                                                Orientation="Horizontal">-->
                                                    <materialDesign:PackIcon Kind="Cog"
                                                                             Width="24"
                                                                             Height="24"/>
                                                        <!--<Label Margin="4 0 0 0"
                                                               Content="SETTINGS" />-->
                                                    <!--</StackPanel>
                                                </materialDesign:ColorZone>-->
                                            </materialDesign:PopupBox.ToggleContent>
                                            <StackPanel>
                                            <materialDesign:ColorZone Mode="SecondaryLight"
                                                                      Padding="6 ">
                                                    <StackPanel Orientation="Horizontal">
                                                        <Button Style="{StaticResource MaterialDesignToolForegroundButton}"
                                                                Command="{x:Static materialDesign:PopupBox.ClosePopupCommand}"
                                                                HorizontalAlignment="Left">
                                                            <materialDesign:PackIcon Kind="CloseThick"
                                                                                     HorizontalAlignment="Right" />
                                                        </Button>
                                                        <TextBlock Margin="8 0 0 0"
                                                                   Text="OPTIONS"
                                                                   VerticalAlignment="Center" />
                                                    </StackPanel>
                                                </materialDesign:ColorZone>
                                                <ContentControl Margin="10"
                                                                Content="{Binding SettingsView}" />
                                                <Button Style="{StaticResource MaterialDesignFlatAccentBgButton}"
                                                        Command="{Binding SaveSettingsCommand}"
                                                        HorizontalAlignment="Left"
                                                        Margin="16"
                                                        Width="150"
                                                        Content="SAVE" />
                                            </StackPanel>
                                        </materialDesign:PopupBox>
1 reply
NuwrssEpaper
@NuwrssEpaper
Hi
i need help in RichTextEditor
i need to put smart hint to be like the material design text field that when the user want to write in the richtext the hint go up to the richedittext like the hint in the textbox ,
now the hint is disappearing when the user want to write in the rich text .
any help plz ?!