0

Trying to style a button using Pixate and MvvmCross in a Xamarin application. The class selector does not seem to work. You can see that the main button class does not set the font color to yellow and the background of the button is not blue

Has anyone worked with pixate and MvvmCross and found a solution to this issue?

defalut.css

button {
    font-size: 30px;
    border-radius: 15px;
    border-width: 2px;
    border-color: lightgray;

}

/* Cannot seem to get class selector to work with mvvm cross */
.mainbutton {
    color: yellow;
    background-color: blue;
}

main.xaml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:local="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:minWidth="25px"
    android:minHeight="25px">
    <Button
        android:text="Test One"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        class="mainbutton"
        local:MvxBind="Click CommandOne" />
</LinearLayout>

enter image description here

Cheesebaron
  • 24,131
  • 15
  • 66
  • 118
Chauncat
  • 248
  • 3
  • 12
  • Is this even MvvmCross related? Does it work when you are not using a binding? Did you run: `Com.Pixate.Freestyle.PixateFreestyle.Init (this);`? – Cheesebaron May 05 '14 at 19:29
  • Isn't the class in pixate "StyleClass" and not just "class"? The iOS version is and I would assume so is the Android version. – Nick Turner Jul 11 '14 at 14:42

0 Answers0