 |
|
 |
All WinRT discussions are now in Windows API and WinRT[^]
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
 |
|
 |
Apologies for the shouting but this is important.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
 |
|
 |
For those new to message boards please try to follow a few simple rules when posting your question.- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
 |
|
 |
Hi all,
I am just beginning out with wpf, so sorry for what is probably an easy question! The reason for my interest in wpf is that I have an application that I need to run on several pcs with different resolutions. What I would like to do is have an area in the app with several buttons on. I want the area to be callable with several 'pages' - similar to using tabs, but I would scroll from left to right through the pages. Each page may have 10 - 20 buttons on it, which will be dynamically positioned on startup, and will resize depending on the resolution of the screen. Any suggestions on how to do this?
Thanks very much in advance
|
|
|
|
 |
|
 |
I think, you can make use of the layout controls to place your buttons ....
|
|
|
|
 |
|
 |
Hey folks. I was wondering if anyone is thinking of upgrading to Adobe CS6 or will you be waiting or skipping the release. Some of our team members are on CS4 and some on CS5, what would you suggest we do regarding CS6. Will appreciate your advice and any experiences positive or negative you may have had with CS6
|
|
|
|
 |
|
 |
You should ask this in the lounge. Your question has nothing to do with WPF or Silverlight.
|
|
|
|
 |
|
 |
hi...
when write tcp channel in c# we add this reference (using System.Runtime.Remoting.Channels.Tcp;)...
i want ask if i want write TCP channel in wp7 what are i reference add ????
|
|
|
|
 |
|
 |
heba abu ghaleih22 wrote: what are i reference add ???
You will still need System.Runtime.Remoting.Channels (amongst others).
|
|
|
|
 |
|
 |
Hello,
I am new to WPF and am having a bit of trouble with a menu radio button item.
I have the following code snippets:
<Menu.Resources>
<ControlTemplate x:Key="Template" TargetType="{x:Type RadioButton}">
<Border removed="Transparent">
<MenuItem Header="{TemplateBinding Content}" IsCheckable="False" IsChecked="{TemplateBinding IsChecked}" IsHitTestVisible="False" Padding="2,3" HorizontalAlignment="Stretch">
</MenuItem>
</Border>
</ControlTemplate>
</Menu.Resources>
<MenuItem Header="Me">
<StackPanel>
<RadioButton Content="Foo" Template="{StaticResource Template}"/>
<RadioButton Content="Bar" Template="{StaticResource Template}"/>
<RadioButton Content="Biz" Template="{StaticResource Template}"/>
</StackPanel>
However, what ends up happening is that my check marks end up on the right side of the vertical menu separator as opposed to the left, as would happen normally using the IsChecked property.
Does anyone know a way to make these check marks appear to the LEFT of the vertical separator? All help is greatly appreciated.
|
|
|
|
 |
|
 |
I want to reuse some styles, so I created a resources file in the root of my project called AppResources.xaml.
I then copied the styles into it. At the top of my view, I replaced the styles with
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Common;component/AppResources.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
Yet I get a compile error "An error occured while finding the resource dictionary 'pack://application:,,,/Common;component/AppResources.xaml'".
What's the right way to do this?
[UPDATE] Fixed it with
If it's not broken, fix it until it is
|
|
|
|
 |
|
 |
i want to find out row number of a datagrid when i move mouse on it i.e. without clicking any row it must return the row number.
Tilak raheja
|
|
|
|
 |
|
 |
A quick look at the documentation[^] suggests the CellEnter and CellLeave events will give you what you need.
Programming is work, it isn't finger painting. Luc Pattyn
|
|
|
|
 |
|
 |
Hi,
I am trying to create stack bart chart in silver light with bars should come in horizental direction by following code
SeriesDefinition tempSeriesForSale1 = new SeriesDefinition();
tempSeriesForSale1.ItemsSource = saleUnits1;
tempSeriesForSale1.IndependentValuePath = "SalesDistrict";
tempSeriesForSale1.DependentValuePath = "saleFromOldCustomer";
//tempSeriesForSale1.Title = "Tik tik";
stackSeriesForSale.SeriesDefinitions.Add(tempSeriesForSale1);
Chart3.Series.Add(stackSeriesForSale);
With this code bars are coming in vertical direction. If I Interchange the Independentvaluepath and dependentvalue path then I gets exception.
Following is the code in .xaml file
<toolkit:Chart Name="Chart3" Title="Repeat Sales" VerticalAlignment="Top" Margin="33,330,176,0"
Height="262">
<toolkit:PieSeries ItemsSource="{Binding}" IndependentValuePath="Name"
DependentValuePath="Types" IsSelectionEnabled="True" >
</toolkit:PieSeries>
</toolkit:Chart>
Can someone please help?
Regards,
Vishal
|
|
|
|
 |
|
 |
[UPDATE] Got it working
I want to style a tooltip so that it looks like a Facebook tooltip[^].
In this design, there can be images, text, links, and buttons, as well as a little triangular pointer. So that leaves a couple of questions...
1) I was thinking that having multiple content presenters would allow me to define the style, and then when it's applied, set the image, text, links, etc. How do you set up multiple content presenters?
2) The triangular pointer... How do you get this to point to the correct spot depending on where the tooltip opens.
Thanks
K
If it's not broken, fix it until it is
|
|
|
|
 |
|
 |
Hi
I am basically trying to create a control that consists of a combobox and some buttons (add, clear etc). I realise I could do it by creating a usercontrol with some codebehind, but I am trying to achieve this by defining a custom control class and a style for the control.
I have done the below based on other custom controls I have done, but the issue I am having is that the ItemsSource is always null and never gets set.
[TemplatePart(Name = ComboBoxControl.INPUTCOMBOBOX_NAME, Type = typeof(ComboBox))]
public class ComboBoxControl : Control
{
#region Constants
const String CATEGORY_NAME = "Custom ComboBox Control";
const String INPUTCOMBOBOX_NAME = "PART_InputComboBox";
#endregion
#region Properties
ComboBox _inputComboBox;
#endregion
#region Dependency Properties
public static readonly DependencyProperty DisplayMemberPathProperty =
DependencyProperty.Register("DisplayMemberPath", typeof(string), typeof(ComboBoxControl), new UIPropertyMetadata(String.Empty));
public static readonly DependencyProperty ItemsSourceProperty =
DependencyProperty.Register("ItemsSource", typeof(IEnumerable), typeof(ComboBoxControl), new UIPropertyMetadata());
#endregion
#region Dependency Public Properties
public string DisplayMemberPath
{
get { return (string)GetValue(DisplayMemberPathProperty); }
set { SetValue(DisplayMemberPathProperty, value); }
}
public object ItemsSource
{
get { return (System.Collections.IEnumerable)GetValue(ItemsSourceProperty); }
set { SetValue(ItemsSourceProperty, value); }
}
#endregion
#region Constructor
public ComboBoxControl() { }
static ComboBoxControl()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(ComboBoxControl), new FrameworkPropertyMetadata(typeof(ComboBoxControl)));
}
#endregion
public override void OnApplyTemplate()
{
base.OnApplyTemplate();
_inputComboBox = (ComboBox)GetTemplateChild(INPUTCOMBOBOX_NAME);
}
}
And the following style:
<Style TargetType="{x:Type local:ComboBoxControl}">
<Setter Property="Label" Value=""/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:ComboBoxControl}">
<Border>
<DockPanel>
<!-- COMBO BOX -->
<ComboBox x:Name="PART_InputComboBox" VerticalAlignment="Stretch" MinHeight="30"
DisplayMemberPath="{TemplateBinding DisplayMemberPath}"
ItemsSource="{Binding Path=ItemsSource, Mode=TwoWay, RelativeSource={RelativeSource Mode=FindAncestor,
AncestorType={x:Type local:ComboBoxControl}}, UpdateSourceTrigger=PropertyChanged}"/>
</DockPanel>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
NOTE: I have omitted irrelevant code.
And trying to set it like this:
<ctl:ComboBoxControl ItemsSource="{Binding Path=Users, Mode=TwoWay}"/>
But the value of the combobox itemsource is always null?!
Can anyone help please?
Thanks
|
|
|
|
 |
|
 |
Ok, I think I may have solved this, but if what I put below isn't the real solution, please let me know.
Where I was setting:
<ctl:ComboBoxControl ItemsSource="{Binding Path=Users, Mode=TwoWay}"/>
I hadn't set the datacontext of the control the combobox was being hosted in. i.e. DataContext = this;
|
|
|
|
 |
|
 |
If you haven't set a DataContext, then your binding would fail here so it would seem fair to say that you found your issue.
|
|
|
|
 |
|
 |
Thanks for confirming Pete.
|
|
|
|
 |
|
 |
Hi all , i'm working on wpf application currently, i doing face detection using microsoft kinect for that i want an ANIMATION during face scanning period.
it should be like one line keep animation on the face square just like xerox machin's laser lightfrom top to bottem.
Thanks in advance..
|
|
|
|
 |
|
 |
This is not a code shop. And if it were we would charge you.
If you have issues on something you can ask a question and maybe someone will be able to help you solve the problem.
So if you would like to actually ask a question go ahead. But don't ask for anyone to do your job for you. It will not happen.
Computers have been intelligent for a long time now. It just so happens that the program writers are about as effective as a room full of monkeys trying to crank out a copy of Hamlet.
|
|
|
|
 |
|
 |
Hi! What is the namespace to include for ShellExecute to compile? I've to open a URL from WPF Emulator. How to do this? I tried <pre lang="c++">Process.Start()</pre> But it opens many times. ShellExecute() doesn't compile. It gives the following error: The name 'ShellExecute' does not exist in the current context How to open a URL in WPF?
|
|
|
|
 |
|
 |
I just use Process.Start to open a URL. Here's an example from the code I'm looking at right now:public static void OpenUrl(string url)
{
if (string.IsNullOrWhitespace(url))
throw new ArgumentNullException("url");
Process.Start(url);
}
|
|
|
|
 |
|
 |
Pete O'Hanlon wrote: Process.Start(url);
I've used this. It's opening the URL many times. I want only one time. How to do this? What about ShellExecute with WPF?
|
|
|
|
 |
|
 |
It only opens it once per execution - sounds like you're hooked into calling that many times - and you would have to write interop code for ShellExecute, where you'd still get the same issue. Put a breakpoint on your Process.Start code and see how many times it's being called.
|
|
|
|
 |