Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 22 14:15
    StefanoRivolta-Previero opened #2356
  • Jun 22 12:26
    xMaxximum commented #2355
  • Jun 22 12:26
    xMaxximum commented #2355
  • Jun 22 07:25
    Keboo labeled #2337
  • Jun 22 07:25
    Keboo labeled #2337
  • Jun 22 07:25
    Keboo commented #2337
  • Jun 22 07:14
    Keboo commented #2340
  • Jun 22 07:14
    Keboo milestoned #2340
  • Jun 22 07:14
    Keboo labeled #2340
  • Jun 22 07:04
    Keboo labeled #895
  • Jun 22 07:02

    Keboo on master

    Fix covering issues with multil… (compare)

  • Jun 22 07:02
    Keboo closed #2352
  • Jun 22 07:02
    Keboo closed #2344
  • Jun 22 07:01
    Keboo milestoned #2352
  • Jun 22 06:58

    Keboo on master

    Slider thumb added foreground t… (compare)

  • Jun 22 06:58
    Keboo closed #2353
  • Jun 22 06:56
    Keboo milestoned #2353
  • Jun 22 06:56
    Keboo labeled #2353
  • Jun 22 06:54
    Keboo labeled #2355
  • Jun 22 06:54
    Keboo labeled #2355
CyberCraft
@CyberCr00899523_twitter
2021-05-28_16-40-47.png
CyberCraft
@CyberCr00899523_twitter
Oh that posted my image with out any text... I am trying to use the different color intensities available in the MaterialDesignColors namespace. Currently I have XAML like:
Background="{DynamicResource PrimaryHueLightBrush}" Opacity=".5" but I want to able to do something like Background="{DynamicResource Primary50}" Many Thanks.
3 replies
izzy lyseggen
@izzylys

Hey all!

Is there any best practice or guidance on swapping light / dark themes when you can't add the Resource Dictionaries to Application.Current.Resources?

I'm working on an app that is hosted within another application and thus can't pollute the Application.Current.Resources with the style Merged Dictionaries. I've instead added my Generic.xaml to each of the individual user controls' merged dictionaries. Initially, this works fine, but when swapping themes not all elements seem to respect this (eg Cards, some text, field hints).

The way I'm swapping themes is by adding a global handle on the Merged Dictionariesfrom the main window, then doing this within a user control to toggle the theme

      if ( Globals.RootResourceDict != null )
      {
        var theme = Globals.RootResourceDict.GetTheme();
        theme.SetBaseTheme(DarkMode ? Theme.Dark : Theme.Light);
        Globals.RootResourceDict.SetTheme(theme);
      }

I have linked the repo in MaterialDesignInXAML/MaterialDesignInXamlToolkit#2322 if it's helpful to see the code. Thanks a lot in advance for any advice!

image.png
image.png
Angelinka567
@Angelinka567
image.png
image.png
Hello. How do I set the style through the code?
Henrique Clausing
@HClausing
If I remember correctly, it goes something like this:
dgv.SetResourceRreference(DataGridCheckBoxColumn.ElementStyleProperty, "your style")
VollRahm
@VollRahm
Is there a way to make the slider ripple disappear after releasing it?
image.png
Or do I need to assing a MouseUp event handler and manually unfocus it?
Angelinka567
@Angelinka567
image.png
Hello. Why can't I connect this component?
Jesper Hansen
@jespersh
@Angelinka567 you're probably just seeing intellisense not finding it. Does it work when running?
Kevin B
@Keboo
@Angelinka567 typically you would just do something like:
{
    Header = row,
    Binding = new Binding("Something"),
    ElementStyle = Resources["MaterialDesignStyleKeyHere"] as Style
}
@VollRahm there is an attached property you can use to get back the behavior in previous versions. It is SliderAssist.OnlyShowFocusVisualWhileDragging="False"
@Angelinka567 you may need to reference the control specific styles to be able to reference them as described in the wiki here
robiszep
@robiszep
Dear Community,
I have received a WPF task in my company. Would someone so kind to provide an example public repository like this one?
Thank you in advance. https://www.youtube.com/watch?v=3mYXc4sDKK0
2 replies
Nguyên Minh Hồ
@honguyenminh
Hi, I tried Googling this but can't seem to figure this out.
I have a card, and inside that is a container.
I'll programmatically add more containers of check boxes to that master container, but it is guaranteed that at one time there's only one of the children container visible, the rest are collapsed
How can I make the card auto resize with the content?
Specifically auto resize with the check boxes, which are choice chips
1 reply
robiszep
@robiszep
Dear Community,
@Keboo, thank you for the link for your amazing git repository collection.
I want to improve my application based on Your SimplyBudgetDesktop application and I want to implement authentication/authorization
logic onto that (providing menus and pages based on user's role using Oauth2).
Could you offer some MVVM examples in this subject? (sorry for spamming the room with not Material Design related/technical question)
1 reply
Xaalek
@Xaalek
Hello, is it possible to set a lostfocus event on a <materialDesign:DataGridComboBoxColumn/> ?
2 replies
VollRahm
@VollRahm
@VollRahm there is an attached property you can use to get back the behavior in previous versions. It is SliderAssist.OnlyShowFocusVisualWhileDragging="False"
Thanks that worked
shyam
@shyamshah_twitter
Hi how to MaterialDesignInXamlToolkit from nuget for uwp project
1 reply
?
bebenins
@bebenins
Hello. Just integrated 4.1.0 and noticed that even in Dragablz demo tab selection highlight is gone
image.png
Is there a fix for it? Am I missing something? Thanks
Another example from my app. Top one is 4.1.0. Bottom one is older rev.
image.png
Kevin B
@Keboo
@bebenins that is likely a bug with the latest version. Do you know which version you upgraded from? Would you mind logging an issue for it can I can take a look.
bebenins
@bebenins
@Keboo Upgraded from DLLs that I downloaded a year ago LOL (06.01.2020). So it's been a while. I will log a ticket. Thanks
Shiva Santhosh Kumar
@shivasanthosh
image.png
image.png
Hello, I'm facing this below Combobox background transparent issue ?
1 reply
Stefan Eriksson
@McTopaz

I have this setup of a TextBox and three questions:
<TextBox materialDesign:HintAssist.Hint="First name" materialDesign:HintAssist.Foreground="Blue" Style="{StaticResource MaterialDesignFloatingHintTextBox}" />

#1
When I have NOT clicked the TextBox, the forecolor of the hint text is in some default color.
I would like this color to be Red. What parameter do I need to set the forecolor to Red?
Notice I have already figured out I need the HintAssist.Foreground to set the forecolor I want then TextBox IS clicked.
Unfortunately this forecolor is not the same for NOT clicked and IS clicked .

#2
When I have NOT clicked the TextBox, there is a small horizontal line bellow the TextBox.
This line has some default color. I would like this color to be Green.
What parameter do I need to set the color to Green?

#3
When I HAVE clicked the TextBox, there is another horizontal line being drawn automatically bellow the TextBox.
This line has some default color. I would like this line to be Yellow.
What parameter do I need to set the color to Yellow?
Or is this the same parameter that controls the default line in #2?

Sorry for some caps words, I just want to be clear.

Kevin B
@Keboo

@McTopaz a few options.

  1. There are a few ways to control this. The simplest is to simply set the Foreground property on the TextBox. However this also sets the foreground of the TextBox as well. An alternative is the HintAssist.Hint property is not a string and can accept any arbitrary content, so if you want full control of it you can do something like this:
    <TextBox  Style="{StaticResource MaterialDesignFloatingHintTextBox}">
     <materialDesign:HintAssist.Hint>
         <TextBlock Text="First name" Foreground="Red"/>
     </materialDesign:HintAssist.Hint>
    </TextBox>
  2. You can do this by setting a resource brush on the TextBox with the key of MaterialDesignTextBoxBorder like this:
    <TextBox Style="{StaticResource MaterialDesignFloatingHintTextBox}">
         <TextBox.Resources>
             <SolidColorBrush x:Key="MaterialDesignTextBoxBorder" Color="Green" />
         </TextBox.Resources>
    </TextBox>
  3. This color is controlled by the underline control. You can control it with the TextFieldAssist.UnderlineBrush. Like this:
    <TextBox  Style="{StaticResource MaterialDesignFloatingHintTextBox}"
             materialDesign:TextFieldAssist.UnderlineBrush="Yellow" />

I have also uploaded a small sample app showing various colors on the text box and how to change them. You can find that here

wuhl508159280
@wuhl508159280
hi all, Can anyone tell me how this space is made like this, can have a start and end time
I see that this control is provided by the material design website, but there is no information on GitHub
Kevin B
@Keboo
@wuhl508159280 that looks like a something that is built with the Calendar control. You can see some sample usage of it in the demo app on the Pickers page.
Stefan Eriksson
@McTopaz

@McTopaz a few options.

  1. There are a few ways to control this. The simplest is to simply set the Foreground property on the TextBox. However this also sets the foreground of the TextBox as well. An alternative is the HintAssist.Hint property is not a string and can accept any arbitrary content, so if you want full control of it you can do something like this:
    <TextBox  Style="{StaticResource MaterialDesignFloatingHintTextBox}">
     <materialDesign:HintAssist.Hint>
         <TextBlock Text="First name" Foreground="Red"/>
     </materialDesign:HintAssist.Hint>
    </TextBox>
  2. You can do this by setting a resource brush on the TextBox with the key of MaterialDesignTextBoxBorder like this:
    <TextBox Style="{StaticResource MaterialDesignFloatingHintTextBox}">
         <TextBox.Resources>
             <SolidColorBrush x:Key="MaterialDesignTextBoxBorder" Color="Green" />
         </TextBox.Resources>
    </TextBox>
  3. This color is controlled by the underline control. You can control it with the TextFieldAssist.UnderlineBrush. Like this:
    <TextBox  Style="{StaticResource MaterialDesignFloatingHintTextBox}"
             materialDesign:TextFieldAssist.UnderlineBrush="Yellow" />

I have also uploaded a small sample app showing various colors on the text box and how to change them. You can find that here

Thank you for your reply Kevin B!
One more question:

When the TextBox is NOT clicked, the hint text seem to have some opacity set to it.
Is this true? Can this value be altered?

Kevin B
@Keboo

@McTopaz yes that value has some opacity, functionally it is coming from the MaterialDesignBody brush which uses the alpha channel to be partially transparent. DarkTheme, Light Theme. If you want to change it for only the TextBox hint itself there are two options.
1) Set the Foregorund property on the TextBox itself. This will change the color of that hint, but will also change the color of the text within the TextBox as well.

<TextBox Style="{StaticResource MaterialDesignFloatingHintTextBox}" Foreground="Red" />

2) You can also set it explicitly on the hint this would give you the greatest control over it.

<TextBox Style="{StaticResource MaterialDesignFloatingHintTextBox}">
    <materialDesign:HintAssist.Hint>
        <TextBlock Text="First name" Foreground="Red"/>
    </materialDesign:HintAssist.Hint>
</TextBox>
Tyler B. Long
@tblong

Looking to get some help on how to animate the badge on a badged button. I have the following xaml for a badged button:

<md:Badged Badge="{md:PackIcon Kind=CheckBold}" 
           BadgeColorZoneMode="SecondaryMid">
    <md:Badged.Triggers>
        <EventTrigger>
            <!-- Is this the correct way to do this? -->
        </EventTrigger>
    </md:Badged.Triggers>
    <Button Content="COPY RESULTS"
            Style="{StaticResource MaterialDesignRaisedLightButton}"
            ToolTip="Copy results to the clipboard"/>
</md:Badged>

I would like to adjust the above such that the badge shows up for 3-ish sec. after the button is clicked and then the badge disappears afterward. Is using event triggers the correct way to go about this?

4 replies
mariannapas
@mariannapas

Hello! I'm using dragablz library for Material tabitem. I need to be able to scroll horizontally the tabitem but not to dragandrop them. I set

<dragablz:TabablzControl   dragablz:AllowDrop="False">

but it didn't work. I also tried

<dragablz:TabablzControl   AllowDrop="False">

but it didn't work too. How can I avoid the drag&drop?

1 reply