|
thank you very much
I was really confused
|
|
|
|
|
|
Mohammad Dayyan wrote: I'm gonna create a MenuItem like
Kind of conflicts with
Mohammad Dayyan wrote: Could you please guide me how I should do it ?
doesn't it?
Try, when you have a specific problem post your code and someone will probably help
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
I have a mate who has had a web site built for him, based on C# and classic ASP, it is all very amateurish and I am considering offering to rebuild the thing properly. This will be a labour of love, or at least a few beers anyway. The design requires a lot of pictures/graphics but is predominately a data driven site.
I have no experience at all with WPF and Silverlight although I have started working through a book and I have built a number of ASPX sites. Also I am a lousy UI designer, I'm the great proponent of battleshit grey.
So, should I use it to learn Silverlight or just stick to ASPX. Professionally I am a winforms LOB developer so there will be limited professional benefit.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
There's a significant learning curve if you're new
to WPF/Silverlight, although since you know .NET
already, it lessens the pain a bit.
Unlike ASP/ASP.NET, Silverlight apps run on the client. This allows
for much richer user experience on the client end that you can't get
from static HTML pages, and you get to use familiar language like C#/VB.NET.
When Silverlight is hosted in an ASP.NET web app, you can
then have processes running on both the server and the client.
If that is something you can (or need to) leverage to make
the site better and the learning curve is worth the time,
then go for it.
Otherwise, I would think ASP.NET would be a good option.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
It turns out there are mild time constraints so I may save the SL for version 2. Thanks for your input Mark
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
hi friends i use wpf Datagrid.
<br />
<Custom:DataGrid VirtualizingStackPanel.IsVirtualizing="True" VirtualizingStackPanel.VirtualizationMode="Recycling" EnableRowVirtualization="True" SelectionUnit="FullRow" RowBackground="Aqua" AlternatingRowBackground="Beige" IsReadOnly="True" SelectionMode="Extended" AutoGenerateColumns="False" Background="White" FontWeight="Bold" FontFamily="Arial" FontSize="10.667" Height="Auto" x:Name="dgChronicDiagnosis" HorizontalGridLinesBrush="{x:Null}" VerticalScrollBarVisibility="Auto" MinHeight="0" VerticalGridLinesBrush="{x:Null}" GridLinesVisibility="None" RowDetailsVisibilityMode="Collapsed" BorderBrush="{x:Null}" ColumnHeaderStyle="{DynamicResource DataGridColumnHeaderStyle}" RowStyle="{DynamicResource DataGridRowStyle1}" BorderThickness="0" Margin="0,4,0,0" VerticalAlignment="Center" VerticalContentAlignment="Stretch" IsSynchronizedWithCurrentItem="True" AreRowDetailsFrozen="True"><br />
<Custom:DataGrid.Columns><br />
<br />
<br />
<Custom:DataGridTemplateColumn Header="OnSet" Width="10*" CellStyle="{DynamicResource TempDataGridCellStyle}" ><br />
<Custom:DataGridTemplateColumn.CellTemplate><br />
<DataTemplate ><br />
<TextBlock Text="{Binding ONSET}" FontFamily="Arial" FontSize="10.667"/><br />
</DataTemplate><br />
</Custom:DataGridTemplateColumn.CellTemplate><br />
</Custom:DataGridTemplateColumn><br />
<br />
</Custom:DataGrid.Columns><br />
</Custom:DataGrid><br />
Now when i bind the Data grid with list having one record there i lot of white space as record increases the space also increases
WANTED wasim khan(Killed 50 Innocent Buggs, Distroyed 200 Exception, make 5 Project Hostage) any Compnay Hire him will pay 30,000. Best place where u can get him is Sorcim Technologies Murre Road RWP
|
|
|
|
|
|
|
|
I can't get u Abinav.Could you just give me the code.Thanks
|
|
|
|
|
|
Sample is fine.But,it wont find out if u enter numerics in text column.I need the entire code for that.When I click the button,it should check the values in textboxes and it should display.Could u help me?thanks
|
|
|
|
|
|
The samples you've been shown show how you can use Silverlight
validation.
You can change the samples to fit your needs.
You could loop through the strings using Char.IsDigit()/Char.IsLetter().
You could also use regular expression matching
bool isalldigits = Regex.IsMatch(inputstring, @"^([0-9]+)$");
bool isallletters = Regex.IsMatch(inputstring, @"^([a-zA-Z]+)$");
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
make an event handler for key_up. Attach it to the numeric data boxes. You still need to validate the data but this will make it easier on the user.
|
|
|
|
|
Hi folks!
Can anyone please help me with this:
I have two values (one manual input and one from a database) and I need to compare them/ validate them via ValidationRules and show errors if they do not match.
LOGIC: V1 == V2 => OK
V1 != V2 => NOK, Error
<TextBlock>
<TextBlock.Text>
<Binding ...>
<Binding.ValidationRules>
<localValidation:ValidateIt V1={Binding Path=...} V2={Binding Path=}/>
</Binding.ValidationRules/>
<TextBlock.Text/>
</TextBlock>
where
public class ValidateIt : ValidationRule
public int V1 {get;set;}
public int V2 {get;set;}
Unfortunately it tells me, that V1 and V2 cannot be bound due to the fact, that these are no DependencyProperties.
I'm stuck...
Thanks in advance,
eza
|
|
|
|
|
They don't need to be DependencyPropety's to be bound. There's a lightweight way of achieving what you want using POCO's. If you take a look at my sample here[^], you'll see that I'm handling the validation based on a ViewModel, which is totally none-DP based.
"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
|
|
|
|
|
Why not function?
please!
<Window x:Class="Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation";
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml";
Title="Window1" Height="300" Width="300">
<Grid Name="Grid1">
<Button Height="25" Width="50"
HorizontalAlignment="Right" VerticalAlignment="Bottom"
Name="Button1">Go</Button>
</Grid>
</Window>
Imports System.Windows.Media.Animation
Class Window1
Private LL As New Windows.Controls.Label
Private Sub Window1_Loaded(ByVal sender As Object, ByVal
e As System.Windows.RoutedEventArgs) Handles Me.Loaded
LL.Content = "dgkdjsjfklògjsòldfg"
LL.Name = "Label1"
LL.HorizontalAlignment Windows.HorizontalAlignment.Left
LL.VerticalAlignment Windows.VerticalAlignment.Top
LL.Foreground = Brushes.Black
LL.Visibility = Windows.Visibility.Visible
Me.Grid1.Children.Add(LL)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object,
ByVal e As System.Windows.RoutedEventArgs) Handles
Button1.Click
Dim sb As New Storyboard
Dim myDoubleAnimation As New DoubleAnimation
myDoubleAnimation.From = 0
myDoubleAnimation.To = 100
myDoubleAnimation.Duration TimeSpan.FromMilliseconds(2000)
Storyboard.SetTargetName(myDoubleAnimation,
"Label1")
Dim PropP As New PropertyPath(Canvas.LeftProperty)
Storyboard.SetTargetProperty(myDoubleAnimation,
PropP)
Dim myDoubleAnimation2 As New DoubleAnimation
myDoubleAnimation2.From = 0
myDoubleAnimation2.To = 100
myDoubleAnimation2.Duration TimeSpan.FromMilliseconds(2000)
Storyboard.SetTargetName(myDoubleAnimation2,
"Label1")
Dim PropP2 As New PropertyPath(Canvas.TopProperty)
Storyboard.SetTargetProperty(myDoubleAnimation2,
PropP2)
sb.Children.Add(myDoubleAnimation)
sb.Children.Add(myDoubleAnimation2)
Me.BeginStoryboard(sb)
End Sub
End Class
|
|
|
|
|
What does 'not working' mean ? We're not going to run your c ode to try to work that out. Have you debugged it ? What do you expect to happen ? What does happen ? Where does it go wrong ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi,
I develop a custom control in VS 2008 and in that control is a DP property of a custom class.
The class has mainly two DP properties of type System.Globalization.CultureInfo and System.Globalization.Calendar . The class derives from DependencyObject .
So when in design time I choose a value for the class, the designer generates xaml code similar to:
<CustomControl.Culture>
<Culture Culture="Deutsch (Deutschland)">
<Culture.Calendar>
<my:GregorianCalendar />
<Culture.Calendar>
</Culture>
</CustomControl.Culture>
But what I want is following:
<CustomControl.Culture>
<Culture Culture="Deutsch (Deutschland)" Calendar="Gregorian Localized">
</Culture>
</CustomControl.Culture>
I adorned the Calendar DP property in the custom class with a TypeConverterAttribute and an ValueSerializerAttribute and built a design dll adding the attributes to the metadata store but nothing is working.
If I write the code in xaml in the second form the designer accepts it and all is fine, but every time
I change the Calendar property in the property browser, the designer changes the code to the first form.
If I implement the custom class derived from object without DP properties, the designer generates code in the second form.
Any ideas if I can influence the designer generated code?
Thanks,
Thomas.
|
|
|
|
|
hi guys
i have to start a new project (silverlight based), but i am unable to find a standard and latest design structure,
should i use L2s or EF, i want to follow to n-tier architecture ,there are many sample applications i have seen but there
WCF services are included in the web application why ?but i want my WCF services in the separate project ,
am i thinking in a right way ? please any help , thanks , regards.
Tauseef A Khan
MCP Dotnet framework 2.0.
|
|
|
|
|
Silverlight is strictly client-side technology.
WCF and other web services are server side.
You don't have to host your web services in the same web
application that hosts the Silverlight application.
In fact, Silverlight apps don't need to be hosted in web
applications at all.
For n-tier, how you connect your client and server tiers is
up to you. You have some options built-in:
Accessing Web Services in Silverlight[^]
For EF you get even more help built-in:
WCF RIA Services[^]
Even though WCF RIA Services is still beta, the Visual
Studio 2008/Silverlight 3 version has a go-live license. I
use it in production applications and it works great - saves
a ton of plumbing code usually needed for typical n-tier/CRUD
type stuff.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi
Our company planing to develop application using sliverlight. since user can use both desktop(standalone) and web(cross browser)
I would like to all feasibility. Sliverlight Is it correct choice? and what are advantage and disadvantage. While installing into desktop from web, do we face some issue?
Regards
Gopal
|
|
|
|
|
If you can do without a full trust application, Silverlight is a
good choice. You can write one app that will run on Win PCs and
Macs, online or offline.
Silverlight has out-of-browser support, which isn't quite the same
as a stand-alone application. You don't get anything special running
out-of-browser beyond the ability to run without a network connection.
The same security restrictions apply, and you're still using the
Silverlight .NET framework, not the full .NET framework.
Silverlight 4 apps will be able to run out-of-browser with elevated
privileges....for more info see Silverlight 4 Beta – A guide to the new features[^]
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|