togglebutton

Reusing a TreeView's expand [+] and collapse [-] buttons in WPF

Is there a way to reuse the simple expand [+] and collapse [-] buttons that appear next to nodes in a WPF TreeView? I would like to have a similar graphic elsewhere in my application for expanding and collapsing some controls. ...

Binding to a WPF ToggleButton's IsChecked state

I would like to use a WPF ToggleButton to expand and collapse some controls in my application. How can I use XAML to accomplish this? I'm thinking that I could somehow bind the Visibility attribute of some controls to the ToggleButton's IsChecked state, but I do not know how to do this. Maybe I need to give my ToggleButton a Name, then...

How to add event handler to AJAX Control Toolkit Extenders

I have been trying to add a toggle button using the ToggleButtonExtender and the MutuallyExclusiveCheckboxExtender. However, I cannot add an additional client side event handler for the click event of the Extender created button. I tried to add a BehaviorId that I access in the onLoad of the Javascript via the $find('') function. However...

WPF Popup hiding problem

Hi ! Suppose you have a ToggleButton for opening a Popup, same behaviour as all known elements as ComboBox etc. ... which is this code: <ToggleButton x:Name="PART_OpenToggleButton" Focusable="False" IsChecked="False" Template="{StaticResource MyToggleButton}"> <Grid> ...

How can I prevent a ToggleButton from being Toggled without setting IsEnabled=False

I have a list of ToggleButtons being used as the ItemTemplate in a ListBox similar to this answer using the MultiSelect mode of the Listbox. However I need to make sure at least one item is always selected. I can get the proper behavior from the ListBox by just adding an item back into the ListBox's SelectedItems collection on the List...

Android Layout: Why don't the TextView and a ToggleButton align

I'm trying to put a TextView and a ToggleButton in a table row, however, they don't seem to align (The top of the button starts about 10px below the top of the textview even though the height each element is the same. Can anyone tell me why? <TableLayout android:layout_width="fill_parent" android:layout_height="wrap_con...

Why does WPF toggle button pulse once unchecked

Within a Desktop app I have a toggle button: <ToggleButton x:Name="CFStglBtn" Checked="cfsCBox_Checked" Unchecked="cfsCBox_Unchecked" IsChecked="True" HorizontalAlignment="Left" Margin="5,0,0,0"> <StackPanel Orientation="Horizontal"> <Image Source="assets\telephone.png" Margin="3,0,0,0" /> ...

How to set a Trigger on a child to a parent property?

I have a TreeView with a ToggleButton ( ExpanderButton ). The togglebutton has a two images ( one for expanded and one when not ). However when I select a TreeViewItem I highligh it with a different color and I'd like to change the color of the images as well ( I have the same ones in the other color ). Problem is I don't know how to se...

ToggleButton group: Ensuring one item is always selected in a ListBox

I am trying to duplicate the left/center/right alignment toolbar buttons in Word. When you click the "Left Alignment" button the Center and Right buttons uncheck. I am using a WPF ListBox with ToggleButtons. The problem is the user can click the Left Alignment button twice. The second click causes the button to uncheck and sets the unde...

WPF - Setting different ToggleButton image for each TreeViewItem root node with styles

I am new to using styles, resources and templates in WPF. What I need to do is override the ToggleButton +/- in the TreeView to be an image, with a different image for each TreeViewItem root Node. For Instance, I would want an image of a car for the "Car" node, and an image of an airplane for the "Plane" node. I have a colorful and a ...

Where'd my ActivityDesigner togglebutton go?

It disappeared! I'm using the standard ActivityDesigner w/Collapsible UI example: <sap:ActivityDesigner x:Class="WHATTHEEFF.WhaHappenToMe" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sap="clr- namespace:Blah blah standard stuff here" ...

silverlight use Expander Toggle template on Toggle control

Hi, I like the look of the toggle button on the Expander control, when using a theme. How could I apply this to a normal Toggle button? Many Thanks Paul ...

OneWay binding for ToggleButton's IsChecked property in WPF

I have a ToggleButton with its IsChecked property bound to a property using a OneWay binding. <ToggleButton Command="{Binding Path=SomeCommand}" IsChecked="{Binding Path=SomeProperty, Mode=OneWay}" /> The SomeCommand toggles the boolean SomeProperty value, and a PropertyChanged event is raised for SomeProperty. If I change So...

How can I get working dynamic ToggleButton text under android?

I've got a ToggleButton that's set up like: final ToggleButton filterButton = (ToggleButton) findViewById(R.id.filterTags); filterButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { if (filterButton.isChecked()) { // pop up the list of tags so the u...

[Ext-Gwt (Gxt) Grid] Setting Record Data resets ToggleButton

Hi All, I am facing a strange problem. I have created a normal ext-gwt grid with two columns. One column displays a number and the other renders a ToggleButton. As soon as the ToggleButton gets pressed a small window appears with: 1- a textfield (to enter a number), 2- an ok button. When the ok button is pressed the column containing th...

How to modify ToggleButton behaviour with or without xml in Android

Hi, I've to do a memo card game in android for my project. As for now i'm at the stage where i try to figure out the basic shape of my app. I've read some tutorials, but i can;t figure out how to modify a lot of dynamically created buttons (ie. in 'for' loop), from xml, or even from the code. To make my question clear here's the code i ...