How to hide close button in WPF window?

WPF doesn’t have a built-in property to hide the title bar’s Close button, but you can do it with a few lines of P/Invoke. First, add these declarations to your Window class: private const int GWL_STYLE = -16; private const int WS_SYSMENU = 0x80000; [DllImport(“user32.dll”, SetLastError = true)] private static extern int GetWindowLong(IntPtr hWnd, int … Read more

Android – border for button

Step 1 : Create file named : my_button_bg.xml Step 2 : Place this file in res/drawables.xml Step 3 : Insert below code <?xml version=”1.0″ encoding=”utf-8″?> <shape xmlns:android=”http://schemas.android.com/apk/res/android” android:shape=”rectangle”> <gradient android:startColor=”#FFFFFF” android:endColor=”#00FF00″ android:angle=”270″ /> <corners android:radius=”3dp” /> <stroke android:width=”5px” android:color=”#000000″ /> </shape> Step 4: Use code “android:background=”@drawable/my_button_bg” where needed eg below: <Button android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:text=”Your Text” … Read more

Coloring Buttons in Android with Material Design and AppCompat

Officially fixed in Support Library rev.22 (Fri March 13, 2015). See relevant google code issue: https://issuetracker.google.com/issues/37008632 Usage example theme.xml: <item name=”colorButtonNormal”>@color/button_color</item> v21/theme.xml <item name=”android:colorButtonNormal”>@color/button_color</item>

How to center buttons in Twitter Bootstrap 3?

Wrap the Button in div with “text-center” class. Just change this: <!– wrong –> <div class=”col-md-4 center-block”> <button id=”singlebutton” name=”singlebutton” class=”btn btn-primary center-block”>Next Step!</button> </div> To this: <!– correct –> <div class=”col-md-4 text-center”> <button id=”singlebutton” name=”singlebutton” class=”btn btn-primary”>Next Step!</button> </div> Edit As of BootstrapV4, center-block was dropped #19102 in favor of m-*-auto