|
You should be using the "data table" to create your chart series; not the "data grid".
Charting and "data grid viewing" are "parallel" operations on the same data source; one does not follow the other.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
In Visual C#, I made a user control, which contains several separate "individual" properties. But I would like to make it into one. In which there is a plus sign in font of my property where users could click on it and expand it and access its members. Just like the property Location, Size, or Font.
I tried packaging all those properties into one class and use the class as the property type, but then I have no idea how to get or set the values! And the property just return the whole class as the value! There is NO plus sign for anybody to click!
PLEASE help me out! Thank you very VERY much! God bless you!!!
|
|
|
|
|
|
|
|
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
|
|
|
|
|
Your question is incongruent.
The simplest explanation is that the "code behind" you are "probably" looking for is wired to the following event handler:
SelectionChanged="controlAction_SelectionChanged"
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
Thank you Gerry for your reply,
Actually I had in mind to do a treatment, depending on the selected item. For that purpose, it is essential to determine which item was selected from controlActionComboBox.
But in the code behind I cannot address this comboBox through its name. That's the issue.
And I cannot figure out how to do what I have in mind.
Best regards,
RV
|
|
|
|
|
You can't wire up to an item in your DataTemplate directly. That's not the way that DataTemplates work. You'll need to do something like this[^] and then add the event handlers.
This space for rent
|
|
|
|
|
Thank you Pete for your reply,
I've finally got the solution to this issue through:
string text = (((sender as ComboBox).SelectedItem) as ActionPicture).ImageName
Where ActionPicture is the picture enclosed in the selected. And ImageName is the name of that picture.
Best regards,
Rv
|
|
|
|
|
Hi I need to refactor this code..thanks in advance for any help!!
public MyListViewModel GetData(List<UpdatingViewModel> updatingList, MyListViewModel myList)
{
foreach(UpdatingViewModel x in updatingList)
{
x.Gain = myList.UpdatingView[0].Gain;
x.Amount = myList.UpdatingView[0].Amount;
x.Minimum = myList.UpdatingView[0].Minimum;
x.Charge = myList.UpdatingView[0].Charge;
x.abc = myList.UpdatingView[0].abc;
}
}
|
|
|
|
|
Start by renaming the method. A method that updates something should not be called Get... !
Fix the compilation error. The method is declared as returning a MyListViewModel , but it doesn't return anything.
Then provide a proper description of what you're trying to do, what you've tried, and where you're stuck.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
How do you know when you've succeeded?
Is it: abc; Abc; ABC?
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
add new tools to my tool box as *.dll file.
|
|
|
|
|
Simplest way?
Open the Design view on any form.
Open the Toolbox pane.
Close branches so you get "clear space".
Use Windows explorer to browse to the DLL or EXE file containing your controls.
Drag the Assembly file to the ToolBox and drop it there.
You can also create a new Tab first, and drop them on that if you want it a bit tidier.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Now, I am building an application like Russian dictionary. How to program the Russian pronunciation in C #, which library to use? Does the Speech or Speech.lib libraries contain "text to speech" functions for Russian as well as for English? Please Help me solve text russian to speech in C # using library or not?
modified 20-Dec-17 7:32am.
|
|
|
|
|
According to this[^], yes it does. BTW, remove your email address from your signature - that's a sure fire way to get spammed.
This space for rent
|
|
|
|
|
Thank you so much. Can you show me how to use the SDK? Currently I'm using C # 2012 but have not installed the SDK in C #? Please show me how to use it.
|
|
|
|
|
Google not working at your end?
|
|
|
|
|
Hi everybody,
I'm currently developing an application in which I have to drag a video from in a media element into another container (let's say a kind of library). The video must keep playing in the media element and only a copy is "stored" in that library.
All the videos present in the library must be visible in order to eventually be reloaded (through drag and drop) into the media player for vizualization.
Have someone an idea on how this could be achieved?
Best regards,
RV
|
|
|
|
|
|
Thank you Richard for your reply,
I'm gonna read this article and find out how it can be helpful for my project.
RV
|
|
|
|
|
Hello
I should save appointments on the shared exchange calendar,
how can I do
|
|
|
|
|
CTRL+S?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|