Questions tagged [material-design-in-xaml]

1

votes
1

answer
159

Views

Cannot change accent on materialdesigninxaml

I'm trying to add the MaterialDesign accents to a MenuItem, actually I've managed this partially, this is what I did so far: Menu creation: container definition: I defined a Color converter to display as Ellipse color: public class ColorToBrushConverter : IValueConverter { public object Convert(obj...
Steven
1

votes
1

answer
113

Views

How to set Foreground of a TextBlock in a nested grid?

I've a TextBlock inside a Grid which is inside a PopupBox provided by MaterialDesignInXaml, a sample structure: xmlns:materialDesign='http://materialdesigninxaml.net/winfx/xaml/themes' I'm trying to apply the TextBlock foreground as a global resource in my App.xaml: but not seems to be working, any...
oÆÞ
1

votes
1

answer
330

Views

Insert user control in Material Design Dialog WPF

I am trying to understand material design in xaml in WPF and at this moment I am working on Dialog Host. I tried to put UserControl in material design dialog host but somehow it is not working, I am using material design with Caliburn Micro FW. MainView.xaml MainViewModel.cs private bool _isDialogOp...
Infii
1

votes
0

answer
109

Views

MaterialDesignInXamlToolkit / Snackbar / Style file modify

Is there a way to do Horizontal / Center align for MaterialDesign:Snackbar ? Here is my code. The style file is here from orignal site. I tried to override the stylefile, but My knowledge was too poor. I can't... Here is what I want to make..
Kazuhiko Nakayama
1

votes
1

answer
591

Views

Selected item in combobox disappear

I using the Material Design xaml: http://materialdesigninxaml.net/ In the combobox control when I select an item it will fixed on the top and will be removed from the list, an example: I've selected the items 2, as you can see in this image: the item selected 2 is moved on the top and removed in the...
1

votes
1

answer
136

Views

How to reduce TextBox dimension

I'm using the MDIX framework which provide a Style resource called MaterialDesignTextFieldBoxTextBox. When I apply that style I'll get a very big dimension for the TextBox: (I don't know why the image doesn't appear.) Anyway, I want to reduce the height of that control. I tried using this code: wit...
Amazingstufff
1

votes
2

answer
263

Views

Is it possible to install the MaterialDesignThemes package once and be able to reference it on each and every other wpf project?

I am new in WPF application development and I came across the Material Design package, I am using Visual Studio 2015 Enterprise. Every time I want to create a new WPF application I always go to Project -> Manage NuGet Packages and install the MaterialDesignThemes package for that specific project...
1

votes
1

answer
53

Views

WPF Data Binding ERrors Getting a System.Windows.Data Error: 40

I keep getting this Error: System.Windows.Data Error: 40 : BindingExpression path error: System.Windows.Data Error: 40 : BindingExpression path error: 'ViewModels' property not found on 'object' ''MainWindow' (Name='')'. BindingExpression:Path=ViewModels.EventViewModel.EventName; DataItem='MainW...
Yusha
1

votes
1

answer
0

Views

Change the color in the TextBox in MaterialDesignInXAML

How do you change this blue color in MaterialDesignInXAML? I try to overwrite the style but there is no option to change the color or it is under some strange name that is not in the documentation.
ImpoUserC
1

votes
2

answer
294

Views

How to enable/ disable button of a dialog box depending on validation

Validation part ` Imports System.Globalization Namespace Validation Public Class ISBNLength Inherits ValidationRule Public Overrides Function Validate(value As Object, cultureInfo As CultureInfo) As ValidationResult If value.ToString.Trim.Length = 10 Return New ValidationResult(True,'') Else Return...
Prathik Jain
1

votes
2

answer
764

Views

Styling WPF - Material Design GroupBox in Code

After quite a bit of searching / trial and error, I must resort to asking for the community's help on this one. I'm working on a WPF application using MaterialDesign framework with custom colors defined in my App.xaml and as provided below: There is a need to render certain controls programatically...
georgehatzi
1

votes
2

answer
42

Views

How do you retrieve one of the pallet brushes from the Material Design in XAML toolkit using C# Code Behind?

My pathetic attempt to retrieve one: MaterialDesign.Themes.Wpf.Current.Brushes.MaterialDesignBody (which doesn't work, of course.) The documentation for the brushes is here. The brushes themselves appear to be located here; I can get to them in xaml, but don't know how to get to them in C#. If anyo...
Robert Harvey
1

votes
1

answer
0

Views

How do I use a Pack Icon as a mouse cursor?

I have the following code which I'm using to provide mouse cursor feedback on a drag and drop operation. It uses a local cursor file. private void UserControl_GiveFeedback(object sender, GiveFeedbackEventArgs e) { if (e.Effects == DragDropEffects.None) { e.UseDefaultCursors = true; e.Handled = true...
Robert Harvey
2

votes
1

answer
28

Views

Using colors from a different swatch in MaterialDesignInXamlToolkit

I'm using MaterialDesignInXamlToolkit in my WPF application. As described in the documentation here, I've set a primary and accent color for the entire app in my App.xaml main file. However, there are some places in my app where I would like to use colors from a different swatch than the one defined...
Master_T
3

votes
1

answer
2.9k

Views

MaterialDesign multiple dialogs

I am developing a desktop application with mahapp and materialdesign. Im trying to have two diffrent dialogs in the same userControl. They look like this: I have removed most of the code to keep it simple. When i try to create a dialoghost in C# like this: var view = new MachineNameDialogView(); { D...
Sondre
2

votes
1

answer
1.9k

Views

Set 24-hour time format for TimePicker

I'm building an MVVM Light WPF app in Visual Studio 2015 using the Material Design in XAML Toolkit. Here's the TimePicker control: Here's what the control looks like when you click it: Note that it shows the time in 24-hour format correctly. However, when you select that time and return to the field...
Alex
3

votes
1

answer
52

Views

App.xaml point to a library in a sub-folder

I'm using the material design XAML toolkit library, currently in the app.xaml I have: However, I used pretty-bin to move the library into a /lib sub-folder, as such it can no longer find the resource directory. I'm struggling to work out the correct syntax how would I reference these files from the...
J34245
2

votes
0

answer
554

Views

MaterialDesignInXamlToolkit Dialog losing focus

I'm using MaterialDesignInXamlToolkit and I have a Dialog that lost focus when I execute some threaded methods. First, I show a message to the user (works well); Then, it starts another dialog with a progress ring (works well); At the end, if we have a error response from server, another dialog pops...
stealthcold
1

votes
1

answer
1k

Views

How to set label color of livechart?

I have an application based on materialdesigninxaml framework where I can set the light and the dark color, when the light color is setted I can see correctly the label text which is black, but when I set the dark theme the label of the charts still remain black, so I don't see anything. This is my...
il santino
1

votes
1

answer
1.5k

Views

Closing Material Design DialogHost from Code

I'm trying to find a way to initiate the close of an active DialogHost from code, but have been unable to find the right syntax. I think the main challenge is accessing the DialogHost from a class outside of the MainWindow code behind. The entirety of my XAML: And the code from which I need to initi...
user3342256
2

votes
1

answer
1.2k

Views

WPF overriding ListViewItem style when use Material Design In XAML Toolkit

I installed Material Design In XAML Toolkit to my project. I have ListView which contains within itself GridView (with GridViewColumns) and i want to override styles for each row in this table. But in each case i lose styles from Material Design In XAML Toolkit. I tried do several things: 1) Overrid...
as94
4

votes
1

answer
254

Views

Re-colour individual elements in the Material Design XAML Toolkit - WPF

I'm using the material design toolkit in XAML, and have three different group boxes, I would like to be able to re-colour all there headers, which are currently purple, into green, yellow and red respectively. I've looked here , but couldn't seem to set the colours correctly and unsure if there is a...
Jamestrod
4

votes
1

answer
70

Views

ContentControl Content Property not changing with hosted content

I am trying to learn MVVM and have come across a weird snag. I have a main menu with a drawer control that comes out and shows a menu: In the main window where this drawer is, I have a ContentControl where I set its content with a Binding. This window's binding is set to a view model. and here is th...
tastydew
2

votes
0

answer
66

Views

Use of progress indicator, throws a warning and nothing happens

I'm trying to use a card according to the material design example. I copied the code And I insert it into a grid, because I want the grid to stall until I bring a file to my pc. So I put that covering all the grid (expanded) and then set the visibility to hidden. In my code, I did something like th...
gbianchi
2

votes
2

answer
77

Views

How to get textbox to fill a treeview item

I have a TreeView that has 3 levels in it, driven by a HierarchicalDataTemplate. Here is a partial xaml listing: The Binding on the Width attribute of the TextBlock insures that each TreeViewItem assumes the full width of the TreeView container (and not just the width of the text box). Coupled wit...
Robert Harvey
1

votes
2

answer
390

Views

The name “XamlDisplay” does not exist in the namespace

I am trying to implement Material Design in xaml Toolkit and getting this error The name 'XamlDisplay' does not exist in the namespace 'clr-namespace:ShowMeTheXAML;assembly=ShowMeTheXAML' i just copied and pasted this code from official docs Xaml code I have tried solution provided here Other Quest...
4

votes
1

answer
1.7k

Views

WPF MaterialDesignInXaml PopupBox change icon

I am using MaterialDesignInXAML for a WPF application. I have a PopupBox that I want to change the icon for. Currently it defaults to DotsVertical and I would like to have it as a DotsHorizontal. I tried the following with no luck. Thanks in advance!
David Lee
1

votes
1

answer
2.3k

Views

Material Design In XAML override style not working

I'm having difficulties overriding a very simple TextBox style using the MaterialDesignInXamlToolkit. As far as I can see I've followed the override instructions to the letter: App.xaml MainWindow.xaml MaterialDesignTheme.Overrides.xaml However, unless I remove the x:Key from the style in the overri...
MarkNS
3

votes
1

answer
248

Views

How to stretch TreeViewItem using “Material Design In XAML Toolkit” controls

I would like to have two controls inside TreeViewItem, Textblock aligned to left and togglebutton/content control aligned to right. To do it using standard WPF controls there would be need to override standard ItemContainerStyle and delete 2nd column and/or set property HorizontalContentAlignment to...
buks
2

votes
0

answer
269

Views

MaterialDesign- Flipper WPF: Alignment & Scalling is skew.

I'm using the Material Design in a WPF XAML application, I've got this section of code bellow, when the grid is outside of a 'materialDesign:Flipper' it all renders correctly; ie- it grows/stretch's correctly with the size of the window and it stacks nicely inside of the StackPanel. However, as soo...
Jamestrod
3

votes
2

answer
5.9k

Views

WPF :Material Design + dragablz tabItem header style

I am working in WPF with the MaterialDesign Toolkit and Dragablz. I encountered a problem while trying to style a TabablzControl. I already have style for the windows default TabControl and TabItem header, as shown in the picture: http://i.imgur.com/2anl5rl.png But when I change the default tabCont...
Baruc Almaguer
2

votes
1

answer
1.5k

Views

Dragablz tabablzcontrol

How can I fix that problem? I am using Dragablz tab controls in a WPF project. If tab header's font size is too big, it will disappear. Need some padding? Margin?
Kokoliko
2

votes
1

answer
469

Views

How to change font size of validation result in WPF C#

I have ValidationRule by using System.Windows.Controls and that rule return some custom message. But the font size is too small and how can I change the font size? Screenshot...Textbox content and error content of validation result Here is example code of WPF Window App... public class NotEmptyValid...
Htet Myat Aung
2

votes
1

answer
2.8k

Views

How make MaterialDesignInXamlToolkit Custom Color Theme?

I have to make a personal colot theme with custom accent and primary color palette. Is possible to create a resource dictonary in my project with new custom palette? Can you show me a sample? Best Regards Franco
dr.dran
2

votes
1

answer
1.5k

Views

WPF material design Snackbar duration

Hey all I am trying to figure out how I can empliment a duration for the Snackbar that comes with the ButchersBoy Material Design In Xaml Toolkit found here and here. There is no where that states if I can use a duration or not so maybe I am just looking over it within the code? There has got to be...
StealthRT
2

votes
2

answer
867

Views

How to add personal icons in MaterialDesignInXamlToolkit?

The Material Design Icons project contains large number of icons, but it is not enough for non English country. So how to add another pack icon in personal project without modifying Source Code?
John Zhu