MaterialDesignInXamlToolkit | Google 's Material Design in XAML & WPF , for C # & VB.Net
kandi X-RAY | MaterialDesignInXamlToolkit Summary
kandi X-RAY | MaterialDesignInXamlToolkit Summary
Comprehensive and easy to use Material Design theme and control library for the Windows desktop. To load the source project you will need Visual Studio 2019. Don't worry if you have an earlier version, you can still use the compiled assemblies from NuGet (Install-Package MaterialDesignThemes). There are two demo projects in the solution, restore the necessary NuGet packages and correct the programming syntax that is not compatible with C# versions lower than C# 8.0 (currently used in Visual Studio 2019). Then, you should be able to fire both of these projects up. One is a "pure" Material Design project, the other illustrates how to combine with Dragablz & MahApps.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of MaterialDesignInXamlToolkit
MaterialDesignInXamlToolkit Key Features
MaterialDesignInXamlToolkit Examples and Code Snippets
Community Discussions
Trending Discussions on MaterialDesignInXamlToolkit
QUESTION
I have this ComboBox using the MaterialDesignFilledComboBox
style.
ANSWER
Answered 2022-Jan-27 at 18:06Try changing the Padding property
QUESTION
I have started a blank, new .NET framework 4.8.0 WPF project, and am trying to add Material Design for XAML Toolkit into it. I started by following the quick start guide located on the Github wiki. I installed the nuget packages manually, by using the .nupkg files located here. I get to the first second step of adding the libraries, boom, error.
Could not load file or assembly 'MaterialDesignThemes.Wpf, Culture=neutral' or one of its dependencies. The system cannot find the file specified."
I have looked for hours on how to solve this issue to no avail. Any ideas?
My app.xaml:
...ANSWER
Answered 2022-Jan-25 at 23:21Turns out, this from the tutorial works.
QUESTION
I would like to create a wpf UserControl library utilizing the MaterialDesignInXamlToolkit.
Obviously a library does not have the App.xaml
file that the quick start guide suggests. I was under the impression, that I could use the Themes\Generic.xaml
file plus the ThemeInfo
attribute in AssemblyInfo.cs
but that does not work (apparently this works only for CustomControls) - it cannot resolve the resources.
Is there a way to make this work in a wpf class library?
...ANSWER
Answered 2021-Jul-16 at 09:06Either install the NuGet package and reference the resource dictionaries in the App.xaml
file of the consuming application, or install the package and reference the same resource dictionaries in the control itself in the library:
QUESTION
This question was answered many times but it seems it's something different. I implemented MaterialDesignInXamlToolkit and async command handler as suggested here, so my command handler in the ViewModel looks like this:
...ANSWER
Answered 2021-May-12 at 19:13I do not understand, why.
Most probably because the implementation of myApp.LongRunningProcess()
is not asynchronous and blocks the UI thread.
This has nothing to do with MaterialDesignInXamlToolkit "and some rendering specifics".
You need to make sure that myApp.LongRunningProcess()
doesn't block.
If you replace await myApp.LongRunningProcess().ConfigureAwait(false);
with await Task.Delay(2000)
and you then see the "Process started..." message, you know that the implementation of myApp.LongRunningProcess()
is indeed the issue.
A method is not automatically asynchronous just because it returns a Task
or a Task
.
QUESTION
I am using this MaterialDesign library in my C# WPF application.
How can I programatically get the HEX color ID for example from the color MaterialDesignColors.MaterialDesignColor.LightBlue500
and then convert it to a SolidColorBrush
?
ANSWER
Answered 2021-Apr-13 at 16:54In general, you can get any MaterialDesignColor
using the SwatchHelper
.
QUESTION
I'm working on changing this component but can't get it right at all. I've tried:
- Using WPF functionality for
- "Style → Convert to new Resource.." - resulted in blank ComboBox from default code
- "Template → Convert to new Resource.." - resulted in weird ComboBox looking like default non-MaterialDesign one
- Copying this to my resource dictionary and tried to edit it, but it needed a massive amount of converters and other things I couldn't get it working
The arrow currently looks like this, but this behavior is default and I want to make it a bit bigger, so it's more visible on the big screen and also change the color of the arrow itself
ANSWER
Answered 2021-Feb-10 at 16:25You could use the VisualTreeHelper
class to get a reference to the Path
in the ToggleButton
in the default template and then set its properties:
QUESTION
I am building a WPF application and I would like to have custom MessageBox but I saw that is really tedious and I thought of using the DialogHost provided by MaterialDesign. The problem is that I can't get it to work the way I want it to so let me describe the current behaviour and the wanted one.
The current behaviour:
...ANSWER
Answered 2020-Sep-02 at 14:17Let's try something simple fo you to try at the first time.
The DialogHost is composed of two major parts
- First everything that is displayed into your DialogHost, this have to be into one block (StackPanel, Grid, DockPanel...) that is the content of your DialogHost.
- Second part is more like the context of your dialog, when you want to display it have to be somewhere to be displayed, another block (StackPanel, Grid, DockPanel...), the context is the place where your dialog will be once displayed, il will show centered and darken the rest of the block.
Now you have the main theory let's make a simple sample based on the sample given by the demo and your piece of code.
QUESTION
I want to use the Snackbar from any thread. I declared my Snackbar as i should her; https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit/wiki/Snackbar The Wiki says that I can only access the Snackbar from a Dispatcher thread, but how do I implement this?
the user control xaml;
...ANSWER
Answered 2020-Aug-04 at 15:33All seems to look right for me.
In your ShowDialog()
method you only pass a string "test"
as content for your DialogHost
and you didn't define a DataTemplate
in DialogHost.DialogContentTemplate
nor a DataTemplateSelector
in DialogHost.DialogContentTemplateSelector
. So the default behavior of ContentControl
kicks in when there is no ContentTemplate
or ContentTemplateSelector
defined and you don't pass the XAML elements directly as Content
. This results in a TextBlock
element being created for the dialog content where your string is bound to its Text
property. This is exactly what your picture shows.
So to get a different result than what your picture shows you need to either pass directly your XAML elements which you want to show in your dialog (with a root container element and all buttons your dialog needs) or define a DataTemplate
or DataTemplateSelector
for your DialogHost
in your XAML, if you want to use it in a MVVM scenario.
Look at this example from the repo if you need a hint how you can implement this.
QUESTION
How can I show a Loading-Dialog in my MvvmCross Application?
At first, i did it like so(MvvmCross standard);
...ANSWER
Answered 2020-Aug-03 at 12:07The DialogHost
does not need to be registered. When you place a dialog host instance in XAML like below, the dialog instance will be registered automatically.
QUESTION
I am using Material Desgin for WPF 's DialogHost
and when I set the command to open the dialog my button is disabled, even with the IsEnabled="True"
property.
Here's my button XAML code:
...ANSWER
Answered 2020-Jul-13 at 15:33You need to place your button inside of your DialogHost
, if you do not specify a CommandTarget
.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install MaterialDesignInXamlToolkit
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page