Click here to Skip to main content
15,885,214 members
Home / Discussions / C#
   

C#

 
GeneralRe: Populate graph from datagridview Pin
Ralf Meier21-Dec-17 2:50
mveRalf Meier21-Dec-17 2:50 
GeneralRe: Populate graph from datagridview Pin
Member 1125947821-Dec-17 2:54
Member 1125947821-Dec-17 2:54 
AnswerRe: Populate graph from datagridview Pin
Gerry Schmitz21-Dec-17 10:58
mveGerry Schmitz21-Dec-17 10:58 
QuestionHow can I make a Location-like collapsible properties? Pin
Member 1358759420-Dec-17 18:52
Member 1358759420-Dec-17 18:52 
QuestionRe: How can I make a Location-like collapsible properties? Pin
Richard MacCutchan20-Dec-17 21:36
mveRichard MacCutchan20-Dec-17 21:36 
AnswerRe: How can I make a Location-like collapsible properties? Pin
Ralf Meier21-Dec-17 2:42
mveRalf Meier21-Dec-17 2:42 
AnswerRe: How can I make a Location-like collapsible properties? Pin
Gerry Schmitz21-Dec-17 10:53
mveGerry Schmitz21-Dec-17 10:53 
QuestionAccess a combobox defined in datatemplate Pin
Hervend20-Dec-17 1:18
Hervend20-Dec-17 1:18 
Hi,

I have defined a combobox inside a DataTemplate.
I would like to access the selected item through the SelectedItemChanged event.
Problem: the comboBox seems to be not accessible from code behind.

Could someone tell me how to proceed?

RV

xaml:

<groupbox grid.row="1" grid.column="0" background="Transparent" margin="2,0,5,0">
<groupbox.header>
On going actions list view

<dockpanel grid.row="1" background="Transparent">
<datagrid name="dataGridActionsToPerform" autogeneratecolumns="False"
="" background="Transparent" borderbrush="Transparent">
<datagrid.resources>

<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
<Border Name="Border"
BorderThickness="0,0,0,1"
BorderBrush="Gainsboro"
CornerRadius="4,4,0,0"
Margin="2,0">
<TextBlock x:Name="ContentHeader"
Text="{TemplateBinding Content}"
Padding="5,5,5,0"
Width="{TemplateBinding Width}"
TextAlignment="Center">
</textblock>
</border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="True">
<Setter TargetName="Border"
Property="Background" Value="LightGray">
</setter>
</trigger>
</controltemplate.Triggers>
</controltemplate>
</setter.Value>
</setter>
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="Foreground" Value="Black" />
<Setter Property="FontFamily" Value="Segoe UI" />
<Setter Property="FontSize" Value="12" />


<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
<Border x:Name="Border" SnapsToDevicePixels="true">
<GridViewRowPresenter VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
<Border.Style>
<Style TargetType="Border">
<Style.Triggers>
<DataTrigger Binding="{Binding ColorProperty}" Value="Black">
<Setter Property="Background" Value="Blue"/>
</datatrigger>
<DataTrigger Binding="{Binding ColorProperty}" Value="Red">
<Setter Property="Background" Value="Red"/>
</datatrigger>
</style.Triggers>








<datagrid.columns>
<datagridtextcolumn header="Actions"
="" width="220" binding="{Binding ActionName}">

<datagridtemplatecolumn header="Control"
="" width="50">
<datagridtemplatecolumn.celltemplate>
<datatemplate>
<combobox name="ControlActionComboBox"
="" itemssource="{Binding CollectionOfPictures, Mode=TwoWay}" selectionchanged="controlAction_SelectionChanged" selecteditem="{Binding SelectedItem, Mode=TwoWay}">
<combobox.itemcontainerstyle>

<Setter Property="Padding" Value="5"/>
<Setter Property="BorderBrush" Value="LightGray"/>
<Setter Property="BorderThickness" Value="1"/>


<combobox.itemtemplate>
<datatemplate>
<dockpanel>












RV

AnswerRe: Access a combobox defined in datatemplate Pin
Gerry Schmitz20-Dec-17 4:15
mveGerry Schmitz20-Dec-17 4:15 
GeneralRe: Access a combobox defined in datatemplate Pin
Hervend20-Dec-17 22:45
Hervend20-Dec-17 22:45 
GeneralRe: Access a combobox defined in datatemplate Pin
Pete O'Hanlon20-Dec-17 23:15
mvePete O'Hanlon20-Dec-17 23:15 
GeneralRe: Access a combobox defined in datatemplate Pin
Hervend21-Dec-17 0:02
Hervend21-Dec-17 0:02 
QuestionLinq to Update multiple fields in the list Pin
Member 984545419-Dec-17 20:36
Member 984545419-Dec-17 20:36 
AnswerRe: Linq to Update multiple fields in the list Pin
Richard Deeming20-Dec-17 2:29
mveRichard Deeming20-Dec-17 2:29 
QuestionRe: Linq to Update multiple fields in the list Pin
Gerry Schmitz20-Dec-17 4:37
mveGerry Schmitz20-Dec-17 4:37 
Questionc sharp windows form application in visual studio Pin
Member 1358596919-Dec-17 20:30
Member 1358596919-Dec-17 20:30 
AnswerRe: c sharp windows form application in visual studio Pin
OriginalGriff19-Dec-17 21:38
mveOriginalGriff19-Dec-17 21:38 
QuestionHow to speech russian text in C#? Pin
Ldta19-Dec-17 15:38
Ldta19-Dec-17 15:38 
AnswerRe: How to speech russian text in C#? Pin
Pete O'Hanlon19-Dec-17 19:35
mvePete O'Hanlon19-Dec-17 19:35 
GeneralRe: How to speech russian text in C#? Pin
Ldta20-Dec-17 1:43
Ldta20-Dec-17 1:43 
GeneralRe: How to speech russian text in C#? Pin
Pete O'Hanlon20-Dec-17 2:43
mvePete O'Hanlon20-Dec-17 2:43 
QuestionDrag and drop dynamically a video from a media player to another container Pin
Hervend19-Dec-17 0:19
Hervend19-Dec-17 0:19 
AnswerRe: Drag and drop dynamically a video from a media player to another container Pin
Richard MacCutchan19-Dec-17 2:48
mveRichard MacCutchan19-Dec-17 2:48 
GeneralRe: Drag and drop dynamically a video from a media player to another container Pin
Hervend19-Dec-17 20:37
Hervend19-Dec-17 20:37 
Questionsave appointment on the shared exchange calendar Pin
maxim^18-Dec-17 23:22
maxim^18-Dec-17 23:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.