开发者

Missing features in WPF [closed]

Closed. This question is opinion-based. It is not currently accepting answers. 开发者_如何学C

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 6 years ago.

Improve this question

I have been using WPF for a while now, and while I'm finding it excellent generally, I find it is still missing a number of features. I would like to use this question to compile a list of the most wanted WPF features, and hopefully provide some workarounds.

Please only post one feature per reply so that people can vote. Maybe MS are listening?


WPF seems to be missing NotifyIcon, which I really like to use a lot in my WinForms applications. Third-party alternatives exist which use API calls to set the icon, otherwise if you want NotifyIcon you will have to include a dependency to Windows.Forms.

Missing features in WPF [closed]


Icons in a toolbar are not greyed out by default. This is a massive oversight in my view - what toolbar anywhere in the world doesn't grey out its disabled items?

To workaround, you can add this style to your window resources:

    <Style TargetType="{x:Type Image}">
        <Style.Triggers>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type UIElement}, AncestorLevel=1}, Path=IsEnabled}" Value="False">
                <Setter Property="Opacity" Value="0.3"></Setter>
            </DataTrigger>
        </Style.Triggers>
    </Style>


Integrated DeepZoom control.


Drag and drop hasn't progressed since I started programming Windows UIs back in the day using Visual Basic 3. It would nice to have a xaml-friendly and mvvm-friendly drag and drop framework. Something similar to ICommand where the View could call into a binding on the ViewModel to handle drag and drop.


I really miss the PropertyGrid control.


The Label control needs to have its Target property set explicity in order for the shortcut to work.

In my experience, 99% of the time the label for a control comes immediately before the control that should be focussed when the shortcut key is pressed. It would be if Label acted this way by default. Of course this could be overridden by setting the Target property, but if not set the next control in the tab order should be focussed.


XNA content integration that was discussed last year but postponed: http://channel9.msdn.com/shows/Continuum/WPF4Beta1/


No drop-down menu button. I frequently find myself needing this control in toolbars etc. Any good open source drop-down buttons anyone could recommend? Bonus points for being able to drop down an arbitrary control, not just a menu.


No gaps between rows/columns in a Grid. Frequently, I'm laying out a grid of Label and TextBox/ComboBox/Checkbox controls in auto-sized rows/columns. By default these controls all appear squashed up to each other. It would be nice to be able to specify a vertical and horizontal gap between rows and columns in a grid.

You can workaound this problem by adding a style for each control type in your grid:

<Grid.Resources>
    <Style TargetType="{x:Type TextBox}">
        <Setter Property="Margin" Value="0,0,0,4" />
    </Style>
    <Style TargetType="{x:Type ComboBox}">
        <Setter Property="Margin" Value="0,0,0,4" />
    </Style>
</Grid.Resources>

However, this has the disadvantage of changing the TexBox and ComboBox heights away from the default, and causes problems with lining up the text in the related Label.


That's an easy one: aliased (crisp) fonts.

(Although quick glance at news revealed that it's mostly fixed in the latest beta of .net 4)


GridSplitter's behaviour is useless.

If you drop a GridSplitter into a Grid it's behaviour is completely useless unless you set a bunch of properties on it.

By default a vertical GridSplitter between two columns will make both columns smaller when dragging right, and both columns larger when dragging left. Who ever in the history of the GUI wanted this behaviour?

You'd likely want a grid splitter to do one of two things, resize rows or resize columns. That's a 50% chance of the default behaviour being right. But by default it does neither.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜