Git Product home page Git Product logo

spiegelp / materialdesignextensions Goto Github PK

View Code? Open in Web Editor NEW
739.0 739.0 120.0 1.36 MB

Material Design Extensions is based on Material Design in XAML Toolkit to provide additional controls and features for WPF apps

Home Page: https://spiegelp.github.io/MaterialDesignExtensions/

License: MIT License

C# 99.98% Batchfile 0.02%
app-bar autocomplete material material-design side-navigation stepper wpf xaml

materialdesignextensions's People

Contributors

ahmed-abdelrazek avatar awsmolak avatar dtwk2 avatar jasonwurzel avatar keboo avatar khaled-lakehal avatar laritello avatar martin005 avatar michaldivis avatar mrbcmorris avatar mrxx99 avatar spiegelp avatar unggyu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

materialdesignextensions's Issues

Wrap List Box Items

Hi, How can i wrap Grid List Box Items like it's demo:
GridList
my code:

 <!--Contents-->
        <DockPanel Grid.Row="1">
            <!--Sites List-->
            <ListBox Name="LstSites"
                     Style="{StaticResource MaterialDesignGridList}">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Border Width="220"
                                Height="220"
                                Background="#f5f5f5"
                                CornerRadius="6">
                            <Border.Effect>
                                <DropShadowEffect Direction="270"
                                                  ShadowDepth="1.8"
                                                  Opacity="0.15"/>
                            </Border.Effect>
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="*"/>
                                    <RowDefinition Height="*"/>
                                    <RowDefinition Height="*"/>
                                    <RowDefinition Height="*"/>
                                </Grid.RowDefinitions>
                                <!--Site Logo-->
                                <Border Width="85" 
                                        Height="85"
                                        Background="#f9f9f9"
                                        Margin="5"
                                        CornerRadius="50" 
                                        Grid.Row="0">
                                    <Image Source="{Binding Logo}"
                                           Width="64"
                                           Height="64"/>
                                </Border>
                                <!--Site Title-->
                                <Label Grid.Row="1"
                                       HorizontalAlignment="Center"
                                       Padding="5, 2"
                                       Content="{Binding Title}"/>
                                <!--Site Description-->
                                <TextBlock Grid.Row="2"
                                           Opacity="0.7"
                                           Padding="5, 2"
                                           TextWrapping="Wrap"
                                           Text="{Binding Field}"
                                           FontSize="{StaticResource SmallFontSize}"/>
                                <!--Site Url-->
                                <Label Content="{Binding Url}" 
                                       Grid.Row="3"
                                       Opacity="0.7"
                                       Padding="5, 2"
                                       FlowDirection="LeftToRight"
                                       Foreground="{DynamicResource PrimaryHueDarkBrush}"
                                       FontSize="{StaticResource SmallFontSize}"
                                       Cursor="Hand"/>
                                <!--Options-->
                                <Grid Grid.Row="4"
                                      Background="#f2f2f2"
                                      md:RippleAssist.IsDisabled="False">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="*"/>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
                                    <Button Grid.Column="0"
                                            Style="{DynamicResource MaterialDesignFlatButton}"
                                            Content="{md:PackIcon Delete, Size=20}"
                                            Foreground="{DynamicResource BodyForeground}"/>
                                    <Button Grid.Column="1"
                                            Style="{DynamicResource MaterialDesignFlatButton}"
                                            Content="{md:PackIcon Pencil, Size=20}"
                                            Foreground="{DynamicResource BodyForeground}"/>
                                </Grid>
                            </Grid>
                        </Border>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
            
            <!--Add New Site Button-->
            <Canvas>
                <Button Name="AddNewSiteButton"
                        Style="{DynamicResource MaterialDesignFloatingActionButton}"
                        Canvas.Bottom="25"
                        Canvas.Right="25"
                        Width="50"
                        Height="50"
                        ToolTip="(Ctrl + N)">
                    <md:PackIcon Kind="Plus"
                                Width="25"
                                Height="25" />
                </Button>
            </Canvas>
        </DockPanel>

output:
wpfGridList
wpfGridList

Error in number spinner

Error occurred when clicking number area on Spinner

'ScaleTransform' name cannot be found in the name scope of 'System.Windows.Controls.ControlTemplate.

Unable to change OpenFileDialog colors

I'm using 2.6.0 version from NuGet. I have the following color scheme in my App.xaml:

<!-- Material Design Extensions -->
<ResourceDictionary Source="pack://application:,,,/MaterialDesignExtensions;component/Themes/Generic.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignExtensions;component/Themes/MaterialDesignDarkTheme.xaml" />
<!--  Material Design  -->
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Dark.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.Cyan.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Teal.xaml" />

The application looks as it should:
image

But the dialogs are light colored:
image

The same behavior is for OpenDirectoryDialog and SaveFileDialog.

Is there any way to use the same color scheme for them, as the application uses?

How to properly use the Stepper

How do I know when I have arrived to the next step?

The continue navigation event occurs before the Step is actually selected giving a chance to cancel it.. but how do I know when I have arrived at a step!?

Why no binding to SelectedStep (which gets its value after navigation is complete)

Please help.. I am struggling with this :/

Stepper in Xaml

Hallo,
erstmals vielen Dank fรผr die Extension. Finde ich wirklich klasse.
Ich hab nur eine Frage wegen dem Stepper.
ist es mรถglich die einzelnen Stepper per XAML anzulegen ?
`
<controls:Stepper HorizontalAlignment="Stretch" IsLinear="{Binding Path=IsLinear}" Layout="{Binding Path=Layout}" VerticalAlignment="Stretch" >
controls:Stepper.Steps

            </controls:Stepper.Steps>
        </controls:Stepper>
    </ScrollViewer>`

So ungefรคhr ?

Danke

Stepper vertical alignment stretch doesn't work as expected

I have a stepper hosted in a DockPanel with LastChildFill = true. The stepper does, in fact, inherit the available height within the DockPanel. However, when VerticalAlignment is set to stretch the content is not given the remaining space in the grid, the remaining space is filled below the back/continue buttons. (ie. Top and Stretch look the same except that with stretch the height of the stepper is set correctly.)

Is there a way to make the stepper content fill all available vertical space in its parent?

NotImplementedException When Using MaterialWindow

Issue

I tried to prettify a regular WPF Window to MaterialWindow but encountered this error at startup:

System.Windows.Markup.XamlParseException: ''Initialization of 'Sample.WPF.FirstWindow' threw an exception.' Line number '7' and line position '6'.'

Inner Exception:
NotImplementedException: The method or operation is not implemented.

This was the XAML used, very straightforward:

<mdx:MaterialWindow x:Class="Sample.WPF.FristWindow"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:Sample.WPF"
                    xmlns:mdx="clr-namespace:MaterialDesignExtensions.Controls;assembly=MaterialDesignExtensions"
                    Title="Hello" Height="450" Width="800">
    <Grid />
</mdx:MaterialWindow>

The code-behind had nothing other than InitializeComponent();

And I have merged the following dictionaries in App.xaml:

<Application x:Class="Sample.WPF.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:Sample.WPF"
             StartupUri="FirstWindow.xaml">

             <!--
             Startup="OnStartup"
             Exit="OnShutdown"-->

    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary
                    Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
                <ResourceDictionary
                    Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
                <ResourceDictionary
                    Source="pack://application:,,,/MaterialDesignExtensions;component/Themes/Generic.xaml" />
                <ResourceDictionary
                    Source="pack://application:,,,/MaterialDesignExtensions;component/Themes/MaterialDesignLightTheme.xaml" />
                <ResourceDictionary
                    Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.Amber.xaml" />
                <ResourceDictionary
                    Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Indigo.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>

</Application>

It would've worked without using MaterialWindow, i.e. using WPF window themed by MaterialDesignToolkit alone, although not fancy enough.

Installed NuGets:

  • MaterialDesignColors
  • MaterialDesignExtensions
  • MaterialDesignThemes
  • Nito.AsyncEx.Context

All on latest preview.

New Tabcontrol style

Hello @spiegelp

Your work to design the TabControl is looking great but is a breaking change on my app, is there any easy way to disable it ?

OpenFileDialog doesn't have "Create new directory" button

When trying to initialize OpenFileDialog like this:

await OpenFileDialog.ShowDialogAsync("DialogHost",
          new OpenFileDialogArguments {CreateNewDirectoryEnabled = true});

It doesn't create Create new directory button on dialog.
Using this property when initializing OpenDirectoryDialog and SaveFileDialog works as expected.

OpenFileControl crashes with invalid .png file

Hi Folks,

Great library here, it's wonderful for helping spin up a WPF app with a modern feel. Appreciate your time on the project!

One thing I've noticed is if you have an invalid .png file in a directory, the OpenFileControl will crash hard with a COMException when navigating into that directory and trying to display the preview of the image.

To create a file for recreation, just simply add an empty text file to your system and change the extension on it from .txt to .png.

Is there anyway we could have a default image icon that we fallback to under these conditions?

Thanks again and let me know if I can provide more information!

Chris

Open / Save Dialog - Max filepath bug limit

Trying to enter a very long filename result of a break :

System.IO.PathTooLongException
HResult=0x800700CE
Message=The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
Source=mscorlib
StackTrace:
at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.GetFullPathInternal(String path)
at System.IO.FileInfo.Init(String fileName, Boolean checkHost)
at System.IO.FileInfo..ctor(String fileName)
at MaterialDesignExtensions.Controls.FileSelectedEventArgs..ctor(RoutedEvent routedEvent, Object source, String file)
at MaterialDesignExtensions.Controls.BaseFileControl.SelectFileCommandHandler(Object sender, ExecutedRoutedEventArgs args)
at MaterialDesignExtensions.Controls.SaveFileControl.SelectFileCommandHandler(Object sender, ExecutedRoutedEventArgs args)
at System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
at System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
at System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
at System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
at System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
at System.Windows.UIElement.OnExecutedThunk(Object sender, ExecutedRoutedEventArgs e)
at System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
at System.Windows.Input.RoutedCommand.ExecuteCore(Object parameter, IInputElement target, Boolean userInitiated)
at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at AppTest.App.Main()

Maybe it would be possible to evaluate if the path is too long before validating it ? Another option would be to use unicode the same way as AlphaFS does.

File dialog icons

Hi,

it seems there is an issue with the icons in open/save file dialog. See attached screenshots.
With the demo everything works fine. (first screenshot)
Unfortunately the icons in my own project are wrong.

MaterialDesignThemes v2.5.0.1025
MaterialDesignExtensions v2.4.0

materialdesignextensionsdemo
openfiledialogbug

Animation Exception when opening the OpenFileDialog

Hello,

I'm using MaterialDesingTheme 2.4.1 and MaterialDesignExtensions 2.2.0

The following exception is raised when I try:

        internal async Task OpenFile()
        {
            OpenFileDialogArguments dialogArgs = new OpenFileDialogArguments()
            {
                Width = 600,
                Height = 400,
                Filters = "All files|*.*|C# files|*.cs|XAML files|*.xaml"
            };

            OpenFileDialogResult result = await OpenFileDialog.ShowDialogAsync("RootDialog", dialogArgs);
        }

System.Windows.Media.Animation.AnimationException: 'Cannot animate the 'IsOpen' property on a 'ControlzEx.PopupEx' using a 'System.Windows.Media.Animation.BooleanAnimationUsingKeyFrames'. For details see the inner exception.'
System.Windows.Media.Animation.AnimationException
HResult=0x80131501
Message=Cannot animate the 'IsOpen' property on a 'ControlzEx.PopupEx' using a 'System.Windows.Media.Animation.BooleanAnimationUsingKeyFrames'. For details see the inner exception.
Source=PresentationCore
StackTrace:
at System.Windows.Media.Animation.AnimationStorage.OnCurrentTimeInvalidated(Object sender, EventArgs args)
at System.Windows.Media.Animation.Clock.FireEvent(EventPrivateKey key)
at System.Windows.Media.Animation.Clock.RaiseAccumulatedEvents()
at System.Windows.Media.Animation.TimeManager.RaiseEnqueuedEvents()
at System.Windows.Media.Animation.TimeManager.Tick()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at Ctacs.LogViewer.App.Main()

Inner Exception 1:
XamlParseException: Provide value on 'System.Windows.Markup.StaticResourceHolder' threw an exception.

Inner Exception 2:
Exception: Cannot find resource named 'MaterialDesignComboBox'. Resource names are case sensitive.

Stepper validation

Hi!

Do you have any suggestion how to validate the steps in the stepper?
Basically I have a bunch of viewmodels like in the sample project and I want to validate my properties inside those viewmodels. The question is that how can the validation changes affect to the steps' HasValidationErrors property?

AutoComplete item

Hi
how i convert to data template
AutoComplete2.ItemTemplate = db.ARAPTables.Select(w => w.Name).ToArray();

MaterialWindow.ResizeMode bug

Hello. Just reporting a little issue with MaterialWindow.ResizeMode (xaml code). If it's values set to NoResize everything works as expected, no Minimize and Full Screen buttons, window is not resizable:
image

But when it's set to CanMinimize (which usually has Close and Minimize buttons only, the Full Screen button is still on place and makes the application full screen:
image

I'm using 2.8.0-a01 version.

Autocomplete control suggestion popup refresh

Let's say I use the following IAutocompleteSource implementation :

    public class TestClass : IAutocompleteSource
    {
        public ObservableCollection<Image> ItemsLst { get; set; }
        public IEnumerable Search(string searchTerm)
        {
            searchTerm = searchTerm ?? string.Empty;
            searchTerm = searchTerm.ToLower();

            return ItemsLst.Where(item => item.imgName.ToLower().Contains(searchTerm));
        }
    }

If later on, ItemLst content changes, it will not get reflected directly in the Autocomplete suggestion popup until something new is typed (which triggers the Search() method, I imagine, and refresh the IEnumerable).

.Net Core 3.0

Can you add support for .Net Core 3.0?

Material Design xaml toolkit work fine but the extensions require the full .net framework >= 4.5.

NuGet Package is out of date

As title says, NuGet Package is out of date... Last update was month ago, and it only has Stepper realisation...
Could you please update it to current version with "OpenDirectoryControl", "OpenFileControl" "SaveFileControl" ?

Dynamically create StepButtonBar

I'm implementing your stepper controll on my project.

I need to create a my custom StepButtonBar depending of some binding data. I'm trying to create the StepButtonBar object but can't figure out how to add it to Step interface.

I will appreciate your help.

OpenFileDialog - Select mutiple files

Hi,

is it possible to select multiple files in the FileDialog?

If not, can this request be included as feature request for a future release?

Many thanks

OpenDirectoryDialog.ShowDialogAsync bug

Hi There,

First of all, thanks for a great extension. I have found a bug using the OpenDirectoryDialog.ShowDialogAsync method. Its seems to crash when you set the CurrentDirectory property with a directory that contains no sub folders. When you add a dummy sub folder, the method does not crash.

var options = new OpenDirectoryDialogArguments()
{
ShowHiddenFilesAndDirectories = true,
ShowSystemFilesAndDirectories = true,
CurrentDirectory = VM.OutputDirectory,
Height = 500
};

Cheers

SaveFile throws ReferenceKeyNotFoundException

Hi,

When I try to implement the SaveFile I get the following exception: "ResourceReferenceKeyNotFoundException: 'fileSystemEntriesGroupHeaderTemplate' resource not found."

I get the following stack trace as well: "at MS.Internal.Helper.FindResourceHelper.DoTryCatchWhen(Object arg)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
", without any inner exceptions.

What could be the course of this?

Stepper StepNavigation event System.ArgumentException

I can't figure this one out.

I've added a Stepper to my project and it works just fine. When I to go add the StepNavigation event and then debug, it is throwing an exception.

System.ArgumentException: 'Object of type 'MaterialDesignExtensions.Controls.ActiveStepChangedEventArgs' cannot be converted to type 'MaterialDesignExtensions.Controls.StepValidationEventArgs'.'

I have no idea why this is happening. Any ideas?

Language output

Why always generate the uz-Latn-UZ and de dll? How to disable that?

Stepper doesn't work in colorzone or in Dialogs(MaterialDesignDialogHost)

Unfortunatly the stepper foreground and when hovering the hover-color are not corectly set when the stepper is inside a colorzone from MaterialDesignInXamlToolkit:
image

Something simmilar happens when the stepper is inside a materialDesign-Dialog and the App is set to dark (the dialog is always in light mode):
image

It seems that the stepper is somehow always using the application colors.

Changing theme at runtime not working

Hi,
I'm trying to change the theme at runtime but when I apply the new theme by replacing .xaml resources the SideNavigation shows no items.

Before changing theme
image

After changing theme
image

In app.xaml I have

                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/Generic.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignExtensions;component/Themes/MaterialDesignDarkTheme.xaml" />

This is the function I use to change theme

        public void SetLightDark(bool isDark)
        {
            //new PaletteHelper().SetLightDark(isDark);

            var resources = Application.Current.Resources.MergedDictionaries;

            foreach (var res in resources)
            {
                if (res.Source != null)

                Console.WriteLine(res.Source.AbsolutePath);
            }

            var existingResourceDictionary = Application.Current.Resources.MergedDictionaries
                                            .Where(rd => rd.Source != null)
                                            .SingleOrDefault(rd => Regex.Match(rd.Source.OriginalString, @"(\/MaterialDesignExtensions;component\/Themes\/MaterialDesign((Light)|(Dark))Theme)").Success);

            if (existingResourceDictionary == null)
                throw new ApplicationException("Unable to find Light/Dark base theme in Application resources.");

            var source = $"pack://application:,,,/MaterialDesignExtensions;component/Themes/MaterialDesign{(isDark ? "Dark" : "Light")}Theme.xaml";
            var newResourceDictionary = new ResourceDictionary() { Source = new Uri(source) };

            Application.Current.Resources.MergedDictionaries.Remove(existingResourceDictionary);
            Application.Current.Resources.MergedDictionaries.Add(newResourceDictionary);
        }

Example project to reproduce the problem
TestMaterialExtensions.zip

Persistentsearch as a WPFToolkit autocompletebox replacement ?

So far I've been using WPF Toolkit Autocompletebox (http://www.broculos.net/2014/04/wpf-autocompletebox-autocomplete-text.html) and was wondering if It would be possible to use the persistent search control as a replacement ?

It seems that the persistentsearch control only accepts a IList as a source, are you planning to extend it to support something like ObservableCollection of custom objects (and maybe a bunch of properties like SelectedItem, SelectedValuePath, DisplayMemberPath etc.)

Can't seem to style PersistentSearch very well

Hello,

I love what you've done with these controls so far, however, I'm having a hard time making the PersistentSearch control fit my design, since it's pretty big compared to my other Material Design controls. For some reason, changing the FontSize, Padding and Margin does nothing. I've also looked up other issues in this repo and found that the Autocomplete control has a "Dense" style that can be applied to make it smaller. From what I can tell from the theme XAML, the PersistentSearch only has one style.

Is there any way I can make the PersistentSearch smaller or better yet, apply another style?

I apologise if this question is stupid and has an easy solution.
Keep up the good work! Michal

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.