|
|
I suggest you reinstall the visual studio. Most of these problems will be solved in this way.
modified 27-May-14 4:40am.
|
|
|
|
|
|
Dear friends ,
i have few clarification ...in WPF please tell me
whether is possible or not
1.move the cursor like presentation and click on a button.
2.i have styles as resource dictionary ... is it possible to have as configuration file so that i can change the style in configuration file
3.is it possible to have windows "on-Screen keyboard" brought inside our application
if any possible please give your idea .. or link ..
by
Joe
|
|
|
|
|
Hi there,
I'm new to WPF, so bear with me..
I have a Main View, and a view within it. I set the DataContext in my 'OnStartup' C# method:
Views.MainView view = new Views.MainView();
view.AssignmentView.DataContext = new ViewModels.MainViewModel(_assignmentDataSource);
I have previous / next button in my 'AssignmentView', that are linked to commands. This Moves focus from record to record as expected in my ListView, in my XAML :
<ListView Margin="10" ItemsSource="{Binding Assignments}" Grid.Row="0" BorderThickness="1" Background="{x:Null}" Foreground="Black">
<ListView.View>
<GridView>
<GridViewColumn Header="Assignment Name" DisplayMemberBinding="{Binding AssignmentName}>
</GridView>
</ListView.View>
</ListView>
Great.
However, when I use the following Stack Panel, the TextBox data does not change when I press previous / next. It stays on the first record.
<StackPanel Grid.Row="1" Orientation="Vertical" DataContext="{Binding Assignments, Mode=TwoWay}"/>
<StackPanel Orientation="Horizontal"/>
<Label Content="Assignment Name:" Margin="0,0,4,0"/>
<TextBox Width="158" Text="{Binding Path=AssignmentName}"/>
</StackPanel>
</StackPanel>
I think its a problem with the 'DataContext' - I don't think I should be wiring it up in the Stack Panel, but when I remove it, there is no data in the Stack Panel text box..
Where am I going wrong?
Any help greatly appreciated. Thanks.
Jon
bgfbgf
|
|
|
|
|
hi
How can I use up & down arrow to move textblock ??? & other controls like listbox & combobox on my user control wont active ??
plz let me know any Solution??
thnxx
|
|
|
|
|
You will need to write animcation transformation code on keydown to move these controls.
See here[^] for an example.Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
thnx alot for your solution but here is a problem, i need to move TextBlock inside Canvas or Grid not outside from these .
any solution??
|
|
|
|
|
urooj_mahmood wrote: thnx alot for your solution but here is a problem, i need to move TextBlock inside Canvas or Grid not outside from these .
You would need to move the the textblock relative to the canvas and grid, not relative to the page.
I hope that helps.Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
yes m doing the same as u said but when i move texrblock, it can move outside the Canvas or Grid but i dnt want to move Text Block outside the Canvas or Grid...
any solution??
|
|
|
|
|
You will need to write your some code to check if the textblock is moving outside the canvas. If it is, you do not allow it to move (transform) further.Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
|
I could not locate a sample, but this is what I would do in the LayoutUpdated handler -
if ((((FrameworkElement)myControl).DesiredSize.Width) > myContainer.Width)<br />
{<br />
_translateTransform.X = myContainer.ActualWidth -(((FrameworkElement)myControl).DesiredSize.Width);<br />
}
The same thing needs to be implemented for the y co-ordinate.
Hope it helps.Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
I have used another way, i have added condition to on move funcation its working fine..
thnxx
|
|
|
|
|
Is there any solution to apply template on selected item event instead of mouse over???
reply fast ..
|
|
|
|
|
hi
I want to add multiple layers on my Silverlight User Control like PhotoShop & Flash but dint get any solution for my problem
is there any solution ???
please let me know as soon as possible
thxxx
|
|
|
|
|
Every control has a Canvas.ZIndex property.
Check if this[^] z-index value is able to give you the layer effect.Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
Hy,
I'm new like Really new to WPF. No WPF at work.
Anyway I would really apreciate some good WPF book titles/names. And please no ... for Dummies.
Thakns in advance.
|
|
|
|
|
|
thanks. I bowsed throught it and it seems interestring.
|
|
|
|
|
There are some excellent articles here[^] on CodeProject for beginners in WPF; especially by Josh Smith & Sacha Barber. The book suggested by the previous poster is also worth investing in. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Hello, I have created a new article
Automatic WPF mapping to Database (Access 07 edition)[^]
and I would improve some parts if it's possible, I created a list of controls,dependency properties,string like:
mapping.CustomAdd(C1_Name,TextBox.TextProperty,"Name");
where the third column is the name of a field and by reflection I get/set the value of the class. My question is:
Is too much overheard add dependency properties linked to fields of a custom class? The class has to inherit from control?
Any example of implementing it would be great, Thanks
|
|
|
|
|
Juan
I've added my comments against your article, but I'll reiterate here for anybody who doesn't go over. I'm surprised that this implementation doesn't use MVVM. It would be worth looking to put that into place to make things easier for yourself."WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hello I'm trying to format a DateTime in XMAL, I found one page that explains that but in my case is not usefull. I want to put a format to DateTime value when it is binding, I have this piece of code:
ToolTip Name="Tooltip1" Style="{StaticResource TooltipStyle}" Content="{Binding
Converter={StaticResource dataPointConverter},
ConverterParameter='Date:{#XValues:}{#NewLine}Measure: {#Value}'}" >
<ToolTip.RenderTransform>
<TransformGroup>
<ScaleTransform x:Name="ScaleTransofrm2"
CenterX="30" CenterY="20"/>
<RotateTransform x:Name="RotateTransform1"
CenterX="30" CenterY="0"/>
</TransformGroup>
The XValue is the value that I want to format (this is the datetime).
If someone knows how to do that, I will be appreciated.
Regards and thanks in advance.
|
|
|
|
|
You could put in some logic in your converter to format date values based on the converterparameter. Not a pretty way to do it, but it might work.Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|