Coder Social home page Coder Social logo

Comments (12)

xingxing2008 avatar xingxing2008 commented on August 20, 2024 1

可能是因为CF api给的Json本来就不按顺序排()
等待Natsurainko修复

from natsurainko.fluentlauncher.

natsurainko avatar natsurainko commented on August 20, 2024 1

image

from natsurainko.fluentlauncher.

xingxing2008 avatar xingxing2008 commented on August 20, 2024

不到啊,(@natsurainko
估计是设计用途把()等Natsurainko回来看看

from natsurainko.fluentlauncher.

Lightczx avatar Lightczx commented on August 20, 2024

image
这里也没有按版本号排序,有点诡异(

from natsurainko.fluentlauncher.

gaviny82 avatar gaviny82 commented on August 20, 2024

这里的 FlowDirection 是刻意改成 RightToLeft 的么

<ComboBox
HorizontalAlignment="Stretch"
FlowDirection="RightToLeft"
ItemsSource="{Binding GameFolders}"
SelectedItem="{Binding CurrentGameFolder, Mode=TwoWay}">
<ComboBox.ItemTemplate>
<DataTemplate x:DataType="x:String">
<TextBlock Text="{Binding}" TextTrimming="CharacterEllipsis" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>

似乎所有的ComboBox都是这样,是有什么设计意图么 感觉看上去很不舒服

可能是因为LTR的ComboBox内容太长会导致展开的Flyout显示位置不对。

如果设置Width="Auto",展开ComboBox时ActualWidth会变成最小值,并且LTR的Flyout会尝试对齐最左边。如果设置RTL会对齐最右边,这样就没问题了。向右对齐ComboBox导致Flyout位置的问题在WinUI里也有人提过microsoft/microsoft-ui-xaml#6554
image

给ComboBox设置一个固定宽度可以缓解这个问题,但这样会减少显示空间,效果如下:
image
image

from natsurainko.fluentlauncher.

gaviny82 avatar gaviny82 commented on August 20, 2024

这里有人给了WPF计算ComboBox里面最长一项的宽度的方法,是用Behavior实现的,可以参考
https://stackoverflow.com/questions/1034505/how-can-i-make-a-wpf-combo-box-have-the-width-of-its-widest-element-in-xaml

from natsurainko.fluentlauncher.

natsurainko avatar natsurainko commented on August 20, 2024

image
如果FlowDirection="LeftToRight"这样设置 Flyout会一直靠右

from natsurainko.fluentlauncher.

natsurainko avatar natsurainko commented on August 20, 2024

image
或者改成改成这样的效果

from natsurainko.fluentlauncher.

gaviny82 avatar gaviny82 commented on August 20, 2024

是的,只有ComboBox宽度大于最长一项的时候才能保证正常显示效果。

另外需要考虑特殊情况:当窗口大小不足以显示全部内容时,展开后Flyout的最右侧还是会超过ComboBox的最右侧。

from natsurainko.fluentlauncher.

Lightczx avatar Lightczx commented on August 20, 2024

image 或者改成改成这样的效果

这种看上去挺好的
加个TooltipService.Tooltip吧

from natsurainko.fluentlauncher.

Lightczx avatar Lightczx commented on August 20, 2024

另外就是guide界面的combobox也是一个样的,我刚开始迷惑了挺久的(

from natsurainko.fluentlauncher.

natsurainko avatar natsurainko commented on August 20, 2024

image
已修正

from natsurainko.fluentlauncher.

Related Issues (20)

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.