Giter Site home page Giter Site logo

mahapps / mahapps.metro Goto Github PK

View Code? Open in Web Editor NEW
9.1K 447.0 2.4K 118.48 MB

A framework that allows developers to cobble together a better UI for their own WPF applications with minimal effort.

Home Page: https://mahapps.com

License: MIT License

C# 99.99% PowerShell 0.01%
mahapps metro wpf xaml ui wpf-mahapps modern windows c-sharp oss

mahapps.metro's People

Contributors

adeniltonbs avatar azurekitsune avatar batzen avatar bitbeans avatar bitterskittles avatar butchersboy avatar chandramouleswaran avatar daveraine avatar deadpikle avatar dotnetifier avatar evangelink avatar flagbug avatar icehunter avatar jakeginnivan avatar mgnslndh avatar michaelmairegger avatar mrahhal avatar programatix avatar punker76 avatar quantumdeveloper avatar remcoros avatar shiftbot avatar spiritdead avatar thoemmi avatar tide avatar time2code0 avatar timunie avatar vegar avatar vikingcode avatar zeluisping 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  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

mahapps.metro's Issues

GridView keyboard navigation doesn't work

When using the Metro style on a GridView inside a ListView, the keyboard navigation doesn't work anymore. Nothing happens when pressing the up/down arrow keys instead of moving through the list of items.

Button in WindowCommands doesn't get automatically bound by Caliburn.Micro

Using a Controls:MetroWindow.WindowCommands/Controls:WindowCommands/Button with a Click handler in the code-behind works fine, but if I use Caliburn.Micro it doesn't automatically get bound to the ViewModel's action.

Instead I have to explicitly set up the action:

<Controls:MetroWindow.WindowCommands>
    <Controls:WindowCommands>
        <Button x:Name="ViewLogs" Content="VIEW LOGS">
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="Click">
                    <cal:ActionMessage MethodName="ViewLogs"/>
                </i:EventTrigger>
            </i:Interaction.Triggers>
        </Button>
    </Controls:WindowCommands>
</Controls:MetroWindow.WindowCommands>

I'm not sure if this is a MahApps.Metro bug or a Caliburn.Micro bug, I don't know enough about how either works to say, but if I just drop the above and put a <Button x:Name="ViewLogs" Content="VIEW LOGS'/> within the <Controls:MetroContentControl>, everything works fine.

I'm using MahApps.Metro 0.7 and Caliburn.Micro 1.3.1.0, both from NuGet.

Title Bar links

I talked to you on Twitter about this. You told me to create a request for an easier way to add "Settings | About" etc next to the WindowControls.

MetroWindow specified with no Height and Width will not size to fit content

It looks like there is a hard coded default window size of 1449x849 (although I can't see where!).

When no Height or width is specified I would expect the window to size to its content. You can reproduce this by simply removing the Height and Width specifications from the xaml for MainWindow in the MetroDemo project.

Hide ResizeGrip

I need a way to hide the Resize Grip, its not needed in all situations.

WindowCommands Control missing from NuGet Package

Hello,

I've notice that samples and other code that reference the WindowCommands tool, which I assume adds the close, maximize, and minimize buttons to the form. I believe this is present in the latest Master branch on GitHub, but not in the NuGet package? Is this a known issue, or am I missing more here?

Thanks,
Patrick

Inner content of Tile cannot be vertically aligned to top of Tile

When using the Tile, there does not seem to be a built-in method of placing child content of a Tile vertically aligned to the top of the Tile. I've tried various settings of the VerticalContentAlignment and VerticalAlignment, but the inner content always stays at just above the Title.

The only way I've found to have the child content align at the top is to explicitly define it's height:

<mah:Tile>
    <Grid Height="140" Width="140">
        <TextBlock Text="My Text" />
    </Grid>
</mah:Tile>

Would it be possible to update the Tile so the inner content can be set vertically top, middle or bottom without having to define the inner content's height?

Using the "Count" property to set the inner text has the same issue, re: can not set to vertically top aligned.

How to change the background for a mah:Tile?

I've hit a daft moment and cannot come up with any way to change the background color for a mah:Tile. I've tried changing the Background color, setting up styles, etc... coming up empty. Any suggestions would be appreciated.

Style incompatibility with Windows Workflow Foundation 4 designer

Applying the style in the Controls.xaml style causes the "Browse for Types" option in the type drop-down combo boxes to stop working. None of the other styles have any impact. To reproduce (in VS2010), create a new WPF application. In the code-behind for the Window1.xaml, import the following namespaces:

using System.Activities;
using System.Activities.Presentation;
using System.Activities.Core.Presentation;

Then declare two class members:

private DesignerMetadata _designerMetadata;
private WorkflowDesigner _designer;

Lastly, add the following lines to the constructor:

_designerMetadata = new DesignerMetadata();
_designerMetadata.Register();
_designer = new WorkflowDesigner();
DesignerGrid.Children.Add(_designer.View);
_designer.Load(new ActivityBuilder {Name = "Test Workflow"});

Where DesignerGrid is the name of the grid layout control at the root of the window.

Apply the resources as mentioned in the MahApps.Metro guide page, and change the Window to a MetroWindow.

Run the application, and in the workflow designer, at the bottom of the window, choose "Arguments". Click on the text to "Create a new argument" and an argument with some default settings will be added. Drop down the type combo box, and click on the "Browse for Types..." option. Nothing will happen.

Go back to the resources added to the window and comment out the Controls.xaml resource. Rerun the application and repeat the steps above. The type browser will now load.

problem with web browser jump

Hi,
I've got some problems with MetroWindow and position of webbrowser in it
bug

It happens on every window open. If I resize window - everything becomes normal
ok

you can just move mouse on maximize button.

markup is very simple

<metro:MetroWindow
<Grid
<Webbroser in grid cell

if I remove MetroWindow and place simple Window - everything is ok from the start.

I use

Can you help with this issue? is there any fix or something?

Date/Time Picker (Win8)

Win8/Metro has a "date/time" picker set of controls that look like

WPF's inbuilt datetimepicker is garbage. A control (not just restyling) would be needed. There is (for Win8/WinRT) Callisto that implements such a control in XAML/C#, but I haven't checked what it actually looks like yet.

Alternatively, restyling existing third-party controls might be a better approach

Discussion: Definitive "Sample" app.

I'm working on a small project for controlling my monitor brightness, along with a few other things. For me, its natural to use MA.M for the UX, and thats why I posted the question about animations/transitions, as I had a need in that app for them.

Now, its becoming a much larger app than originally intended, but it shows some clear uses of MA.M in a MVVM (Caliburn Micro) situation, and how to create (what I think is) a good UX with the library.

Is anybody interested in that style of sample app? That is, more than a "Hello, World", but an actual app?

If so, are there certain elements (controls, interaction with other libraries, etc) that people want to see in such a demo app?

Minimize/Maximize/Close tooltips aren't localized

Not a big deal, but I mention it here.

The tooltips of the minimize/maximize/close buttons aren't localized to the current culture of the OS.

I did a bit research, but I found no way to inherit the tooltips of the window commands.

NoResize on MetroWindow

ResizeMode="NoResize" should:
a) stop the window from resizing
b) remove the resizer grip
c) remove the min/max buttons on the window.

Dark theme selected listview entry background issue

In the dark themes, selected listview entries are unreadable when listview loses keyboard focus because the background of selected item goes light grey with white text on top. Personally I see no need for a different background colour on loss of kb focus, but could go for a darker grey if people think it is important

Discussion: Animation/transitions

MA.M has been all about controls which are one part in creating a great UI, but little to no focus has been put on animations and transitions. I have a few libraries that could be included/referenced, and some demos created to show how to use it in a 'metro'/mvvm style app, but first I'd like your (community) input.

1 - How do people feel about including something to handle animations/transitions?
2 - Does anybody have a preference/suggestion on what libraries (if any) we should use?

TextBlock does not inherit dark color scheme

Using v0.7.1.0, the TextBlock does not inherit the dark color scheme. This is reproducible by running the demo project and switching to any of the dark themes; on the 2nd tab (more controls here!), there are TextBlocks used as headers above the ComboBoxes which will exhibit this issue.

MetroWindow window move

I need to create full screen app without user window move possibility.

I am using:

WindowsSettingBehaviour with ResizeMode="NoResize" WindowStyle="None" WindowState="Maximized" ShowTitleBar="False" ShowCloseButton="False" ShowMinButton="False" ShowMaxRestoreButton="False" Topmost="True"

and BorderlessWindowBehavior.

window move possibility is persist.

Thank you!

WindowState issue

When I set WindowState to Maximized there is "Maximise" button between "Close" and "Minimise" instead of "Restore" button.

AppBarButton does not load image

The AppBarButton class will not load its image unless the image is already loaded by some other object. To reproduce this in the sample application simply comment out the button that uses the appbar_barcode image thus:

                            <!--
                            <Button Style="{DynamicResource MetroCircleButtonStyle}"
                                Height="55"
                                Width="55"
                                VerticalAlignment="Top">
                                <Rectangle Width="20"
                                    Height="20">
                                    <Rectangle.Fill>
                                        <VisualBrush Stretch="Fill"
                                            Visual="{StaticResource appbar_barcode}" />
                                    </Rectangle.Fill>
                                </Rectangle>

                            </Button>
                            -->

The 2 AppBarButtons that also use this image will now be empty.....

Apologies, but I am still a bit new to xaml so I am not in a position to suggest a solution at the present time.

ReSharper Style - what settings?

We occasionally get PRs where people have run R# over the codebase to suit their style - which distracts from the code changes and leads to endless debate around what settings are right.

See this topic for why we will ask for a PR to be redone.

I'd like to use this as an opportunity to talk about what R# settings you use and which ones should be applied to MahApps.Metro. No pull requests at this point - I'd rather do this carefully and accurately and include a R# settings file in source control so that people know what the rules are.

EDIT: I'll clarify my intent here - cleaning up a codebase should not be done in one fell swoop - it should be done carefully and methodically.

One of my favourite goals in this regard is the Boy Scouts rule: "Always leave the campground cleaner than you found it."

The workflow should be this:

  • Make the change
  • Commit
  • Cleanup

Always keep them separate. Always.

Starting things off with a couple of my choices:

var - use wherever possible. Your variable names should be meaningful so I don't need to read the type alongside it. Also helps with code alignment.

Underscores for field names - no. An icky reminder of times past.

Fire away.

Can't set the "IsEnabled" property of the slider control to false

If I create a slider and set its "IsEnabled" property to "False"

<Slider IsEnabled="False" />

I get the following error message:

'HorizontalTrackRectangleDisabledOverlay' name cannot be found in the name scope of 'System.Windows.Controls.Grid'

I've also tried to databind the property to a boolean in my ViewModel, but when the PropertyChanged event fires, but then I get an InvalidOperationException with the above message.

Panaroma Issue

This maybe an issue, or maybe I'm just doing it wrong. If you have two panaroma items and a tile for each of those panaroma items. If the name is short for example like "Hello". If you switch to the next one, it will show half of the second paranoma's tile, rather than the full thing. Now if you do something like "Settings", rather than "Hello" it will work. If it's a long one. It will have the same issue.

Also, shouldn't all the tiles be next to each other than a big space, if the name is too long? I don't have access to a WP7, or my W8 demo to confirm.

In Win8, DWM dropshadows are invisible when out of focus

This is expected behaviour and inline with other apps. However, otherapps tend to have a solid, 1px grey border around them at all times.

We have the code in BorderlessWindowBehaviour to do that, perhaps this should be adjusted for OS > 6.1

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.