cost 261 ms
插入“Label.Text”的 VisualState.Setters 属性时页面崩溃 - Page crash when insert VisualState.Setters Property for "Label.Text"

我有一个带有 Label 和 Switch 的 .NET MAUI xaml 页面。 当我尝试使用VisualState -setter 更改 label 文本值打开/关闭时,它适用于模拟器和手机调试器模式,但是当我将它下载到我的 android 手机时,尝试打开时页面崩溃:! 这是重现问题的代码部 ...

UWP VisualStateManager.GoToState() 不工作 - UWP VisualStateManager.GoToState() Not Working

我创建了一个自定义控件 (ToggleIcon) 作为 CheckBox 的替代品,并且需要向它添加一个 IsChecked 属性,以便可以通过编程方式清除它。 我尝试通过使用VisualStateManager.GoToState()来完成此操作,但尽管执行时没有异常,但它不会更改 state。 ...

UWP 自定义复选框 - ToggleIcon - UWP Customized Checkbox - ToggleIcon

我正在尝试创建本质上是 Checkbox 控件的自定义版本,并且无法让它按照我的意愿工作。 这个想法(我称之为 ToggleIcon)本质上是一个图标,当单击它以表示它已被选中时,它会以某种方式发生变化。 例如,基本想法是当控件处于未选中 state 时显示一个灰色图标,当用户单击该图标时,它将切 ...

VisualStateManager 在 Button.ContentTemplate UWP 中不起作用 - VisualStateManager not working inside Button.ContentTemplate UWP

我已经为此苦苦挣扎了几天,但经过大量努力后无法找到解决方案。 这是我面临问题的代码。 所以我有一个ItemsControl ,其中每个元素都是Button ,每个Button都有一个Image和TextBlock 。 在上空盘旋Button我可以看到Background的Button被改成Red预期 ...

CollectionView VisualStateManager 无法更改选择颜色 - CollectionView VisualStateManager can't change selection color

我正在尝试自定义 CollectionView 中单元格的选择颜色,但无论我如何尝试,它总是丑陋的灰色。 我希望我的项目模板有圆角,但是当我 select 一个项目时,我看到它后面有丑陋的方形灰色角,如下图所示: 这是我目前的 XAML: 我的代码隐藏: 我也尝试过其他方法,但没有任何效果。 有没 ...

UWP VisualStateManager.GoToState 始终返回 False - UWP VisualStateManager.GoToState Always Returns False

当用户提交 TextBox 所属的表单时,我试图在输入验证期间使用视觉状态将 TextBox 输入标记为无效(通过将其边框颜色更改为红色)。 我有以下代码: XAML 注意:这是在 XAML Page上。 我没有使用自定义控件。 C# 问题无论我尝试什么,对VisualStateManager ...

DataTemplate 中的 Xamarin.Forms CollectionView 项目的“背后”是什么(关于背景颜色)? - What is "behind" a Xamarin.Forms CollectionView's Item from DataTemplate (concerning background color)?

我有一个带圆角的框架作为我的 DataTemplate 的最外层容器......但我选择的项目仍然突出显示框架“后面”的背景......请参阅: 我假设我应该向 VisualStatemanager 添加一个 setter,但是我应该针对什么元素来改变它? 以下是视图的摘要: ...

如何更改视觉状态值并重用具有不同属性值的控件? - How to change visualstate values and reuse the control with different properties values?

我已经实现了一个自定义文本框,它可以在MouseOver事件上更改 BorderBrush(在这种情况下,它会更改 BorderBrush,但我可以更改其他属性)。 现在,如果我想在MouseOver上自定义 BorderBrush 的颜色并使用不同的“BorderBrush on MouseOv ...

UWP 奇数和偶数元素 ListBoxItem 的不同样式 - UWP Different styles for odd and even elements ListBoxItem

对于奇数和偶数元素 ListBoxItem 我需要不同的背景。 我找到了一个应该可以解决我的问题的代码,但它不想在 UWP 中工作: 是否有与 ItemsControl.AlternationIndex 属性类似的东西,或者如何在 VisualState 中指定偶数和奇数元素的样式? 预先感谢 ...

UWP 未聚焦的 VisualState 覆盖 ListViewItem 上选定的 VisualState - UWP unfocused VisualState overriding selected VisualState on ListViewItem

我有一个 ListView 在其 ItemContainerStyle 属性上使用自定义样式。 问题是,当我使用键盘浏览列表中的项目时,如果我导航到当前选定的项目,它会获得焦点样式(这很好),但是当我离开该项目时它开始使用未聚焦的样式而不是选定的样式。 例如,假设在 ListView 中选择了 5 ...

使用视觉状态切换 AppBarButton 可见性时出现“未检测到已安装的组件”错误 - “No installed components were detected” error on toggling AppBarButton visibility with Visual States

在我的 UWP 应用程序中,我有一个带有几个 AppBarButtons 的 CommandBar,我正在使用 Visual State 切换其可见性。 每当我将任何 Visual State 应用为VisualStateManager.GoToState(this, nameof(State1), ...

如何更改 Xamarin Forms 中控件的视觉 state? - How to change the visual state of a control in Xamarin Forms?

我正在尝试使用普通的 xamarin forms 制作一个类似视图的标签,因为我不想使用任何第三方插件。 为此,我使用了如下所示的两个框架,并在点击该框架时将其 state 更改为“已选择”和“未选择”,使其看起来像那样。 框架样式: 我的框架: 抽头事件: 但是我希望在页面第一次出现时看起来选 ...

如何通过 Behavior 和 VisualStateManager 将 TextBox 设置为特定的内置 VisualState - How to set a TextBox to a specific build-in VisualState via Behavior and VisualStateManager

我正在尝试使用验证来显示 windows 元素(实际上是文本框)上的验证错误,但是当失败条件发生更改时,我无法获取未聚焦/编辑的文本框以更新其验证(既不使用INotifyDataErrorInfo也不使用IDataErrorInfo )。 假设当TextBox2包含特定路径时, TextBox1验 ...


 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM