styles

Set switchStyle - get error resource not found - why?

☆樱花仙子☆ 提交于 2020-01-01 02:10:06
问题 I ran into a strange Problem: I am creating a style for an app and I set: <item name="android:spinnerStyle">@style/CustomSpinnerAppearance</item> <item name="android:textViewStyle">@style/CustomTextViewAppearance</item> <item name="android:buttonStyle">@style/CustomButton</item> Now I wanted to set: <item name="android:switchStyle">@style/CustomSwitch</item> And I get this error. No resource found that matches the given name: attr 'android:switchStyle'. I have checked in API-Lvl 14 and 15

Change appcompat's SearchView text and hint color

坚强是说给别人听的谎言 提交于 2020-01-01 01:18:09
问题 Does anybody know how to change the text color of the appcompat SearchView? I've spent 2 hours and tried several suggestions from SO and none works. Here is my code: <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:espacios="http://schemas.android.com/apk/res-auto" > <item android:id="@+id/layer_switcher_button" android:icon="@drawable/b_categorias" android:title="@string/menu_layer_switcher_title" espacios:showAsAction="ifRoom|collapseActionView"/> <item android:id="@

Animation in visibility from hidden to collapsed and vice versa

北城余情 提交于 2019-12-31 10:39:33
问题 I am trying to achieve something similar to iPhone message view. On a button click, a delete button would slide out for every message and on clicking "done" the delete buttons would slide in. I have been able to achieve that using mvvm except the sliding effect. Here is the style I could write with my limited knowledge: <Style TargetType="Border"> <Style.Triggers> <DataTrigger Binding="{Binding ShowDeleteButton}" Value="false"> <Setter Property="Visibility" Value="Collapsed"/> </DataTrigger>

How to add global style to angular 6/7 library

自闭症网瘾萝莉.ら 提交于 2019-12-31 10:30:10
问题 I was trying to add global styles in the same way like in angular app, but it totally does not work. My libraries' name is example-lib , so I added styles.css to /projects/example-lib/ . I added styles in main angular.json file: ... "example-lib": { "root": "projects/example-lib", "sourceRoot": "projects/example-lib/src", "projectType": "library", "prefix": "ngx", "architect": { "build": { "builder": "@angular-devkit/build-ng-packagr:build", "options": { "tsConfig": "projects/example-lib

Get the name of current app style sheet in PyQt

一世执手 提交于 2019-12-31 07:37:04
问题 How can I get the name of current style sheet of my PyQt app? app = QtGui.QApplication.instance() print app.styleSheet() app.styleSheet() returns nothing. app = QtGui.QApplication.instance() print app.style() return <PyQt4.QtGui.QCommonStyle object at 0x0000000019BB4678> I need a string, for example 'plastique' 回答1: You can get the class name of the current style, if that's what you're looking for. print app.style().metaObject().className() 回答2: Qt does not use stylesheets for rendering of

What's wrong with this binding?

孤人 提交于 2019-12-31 04:36:07
问题 I'm trying to assign DataContext to a MenuItem, which is part of ListBox. <Style x:Key="ContextMenuStyle" TargetType="telerik:RadMenuItem"> <Setter Property="DataContext" Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=telerik:RadListBox}, Path=DataContext}" /> </Style> <DataTemplate x:Key="TemplateSelector"> <ContentPresenter Content="{Binding}" Name="contentPresenter"> <telerik:RadContextMenu.ContextMenu> <telerik:RadContextMenu> <telerik:RadMenuItem Header=

WPF - How to apply style to AdornedElementPlaceholder's AdornedElement?

我只是一个虾纸丫 提交于 2019-12-30 23:33:13
问题 I'm trying to apply a style to an adorned element, but I don't know the correct syntax. Here is what I've tried: <!-- ValidationRule Based Validitaion Control Template --> <ControlTemplate x:Key="validationTemplate"> <DockPanel> <TextBlock Foreground="Red" FontSize="20">!</TextBlock> <AdornedElementPlaceholder Style="textStyleTextBox"/> </DockPanel> </ControlTemplate> The only problem is that the following line doesn't work: <AdornedElementPlaceholder Style="textStyleTextBox"/> Any help would

WPF binding to another property's binding in a style

不羁的心 提交于 2019-12-30 11:11:50
问题 I'm not sure the best way to ask this question (sorry for the ambiguous question title), but essentially I'd like to set the MaxLength property on a TextBox using a value converter that is passed in a property from the data context, and the property on the passed-in property as the converter parameter. I'd like to do all this in a style, as opposed to on a control-by-control basis. Here's an example of doing this in a non-styled manner: <TextBox Text="{Binding MyPropertyName.TheirPropertyName

Can I change the properties of a binding in a DataTrigger, without knowing the binding itself?

拜拜、爱过 提交于 2019-12-30 08:13:45
问题 I have a TextBox style that formats a number if the box is unfocused, but leaves the number unformatted whlie it's being edited. This is the style I want for multiple number TextBoxes, but they all contain different Text bindings. The only difference between the regular Text setter and the Triggered Text setter is that the Triggered one has StringFormat=N2 in the binding. Is there a way I can make this style generic, such as only changing the StringFormat property of the binding in the

Styles from generic.xaml are not applied

血红的双手。 提交于 2019-12-30 07:54:31
问题 I made a class library assembly in which I created custom controls, and I defined the default styles in the generic.xaml file. It seems this is a quite common problem, as long as many people are posting about it. However I couldn't find any useful answer for my case. the generic.xaml is in the Themes folder. the generix.xaml file Build Action is set to Page. the ThemeInfo is properly defined in my AssemblyInfo.cs. In my test application, if I manually merge the generic.xaml file from my