|
I have a version of Telerik and i used Scheduler view, when I change value of flow direction ,right to left , of my windows, and when I drag a inserted appointment, it does `t normally drag ,
What can I do for fix the problem?
Thanks a lot
|
|
|
|
|
Raise this with Telerik. It could well be a bug.
|
|
|
|
|
|
I change my Telerik version from 2.0 to 4.0,,, and solve it....
Is so nice!! 
|
|
|
|
|
hello
My program has a ListView, which is connected to an ObservableCollection.
If I add values to the ObservableCollection, I can see them in the ListView.
But if I change an object in the ObservableCollection, the change is not seen in the ListView. The modification is made by changing the name in the textbox side and clicking the "CAMBIA"
<Window x:Class="WpfApplication3.bindingListBoxTOstring"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="bindingListV" Height="300" Width="300"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
>
<Grid>
<ListView Name="lv" ItemsSource="{Binding ListBoxCollection, UpdateSourceTrigger=PropertyChanged}" Margin="12,0,128,50" SelectionChanged="lv_SelectionChanged">
<ListView.View>
<GridView>
<GridViewColumn Header="profilo" Width="200"
DisplayMemberBinding="{Binding nome, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</GridView>
</ListView.View>
</ListView>
<Label Content="Cambia valore" Height="28" HorizontalAlignment="Left" Margin="164,23,0,0" Name="label1" VerticalAlignment="Top" Width="102" />
<TextBox Height="32" HorizontalAlignment="Left" Margin="154,56,0,0" Name="textBox1" VerticalAlignment="Top" Width="114" />
<Button Content="cambia" Height="23" HorizontalAlignment="Left" Margin="177,107,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="button1_Click" />
</Grid>
</Window>
namespace WpfApplication3
{
public partial class bindingListBoxTOstring : Window
{
ObservableCollection<ListBoxData> _ListBoxCollection =
new ObservableCollection<ListBoxData>();
public bindingListBoxTOstring()
{
InitializeComponent();
_ListBoxCollection.Add(new ListBoxData { nome = "netgear" });
_ListBoxCollection.Add(new ListBoxData { nome = "alice13" });
}
public ObservableCollection<ListBoxData> ListBoxCollection
{ get { return _ListBoxCollection; } }
public class ListBoxData
{
public string nome { get; set; }
}
private void button1_Click(object sender, RoutedEventArgs e)
{
ListBoxData x = lv.SelectedItem as ListBoxData;
x.nome = (textBox1.Text) != string.Empty ? (textBox1.Text) : string.Empty ;
}
private void lv_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
ListBoxData x = lv.SelectedItem as ListBoxData;
textBox1.Text = x.nome;
}
}
}
|
|
|
|
|
The item you are editing has to notify WPF that it has changed. Just because you have an ObservableCollection , it doesn't mean that your application will be able to respond to changed inside the items that make up the collection. To enable this, you need so expose those items to the binding mechanism as well - fortunately, this is incredibly easy to do.
Change your ListBoxData class so that it (or an ancestor that you choose) implements INotifyPropertyChanged . Then, add the ability to raise a change when nome changes. For example:
public class ListBoxData : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
private string _nome;
public string nome
{
get { return _nome; }
set
{
if (_nome != value)
{
_nome = value;
OnChanged("nome");
}
}
}
private void OnChanged(string propertyName)
{
PropertyChangedEventHandler handler = PropertyChanged;
if (handler != null)
{
handler(this, new PropertyChangedEventArgs(propertyName));
}
}
} Now, whenever you change nome, the PropertyChanged event is raised - and the WPF binding mechanism knows how to handle that. Changes will be reflected in the UI now.
|
|
|
|
|
thanks!!! thanks!!! thanks!!! thanks!!!
I was in danger situation for this problem since two day 
|
|
|
|
|
I am trying to create a user control in a WPF application that includes a BitmapImage that has been added to the project by including it in Resources.resx. In the xaml editor using VS 2012 I can put the cursor inside the BitmapImage tag, and then reference the properties of the BitmapImage from the editor's properties pane.
In the UriSource dropdown box I can see all of the resources that I have added to the application including those images that are included in Resources.resx, but when I add one of the images and run the program, an exception is raised referencing the line in the xaml where the BitmapImage control is defined.
For example if I start with this:
<BitmapImage x:Key="CameraImage" CreateOptions="IgnoreImageCache" CacheOption="OnLoad" />
And use properties pane to select the image I want from the UriSource field, this attribute is added:
UriSource="pack://siteoforigin:,,,/Resources/Camera32x32.png"
From what I can tell this URI references a file that should be on the drive in the "Resources" directory below the point from which the application runs. If so, I understand why this would produce an error, since that directory does not exist where the application runs (and is not supposed to).
From the documentation I have seen, if a resource is embedded in the local assembly (i.e., the exe file), that the right URI should be something like this:
UriSource="pack://application:,,,/Resources/Camera32x32.png"
where "siteoforigin " is replaced with "application ." But that does not seem to work for me either.
The exceptions I see differ depending on different modifications I've made to this attribute's value. The last one referenced gives me a XamlParseException with a message saying, "'Initialization of 'System.Windows.Media.Imaging.BitmapImage' threw an exception," and it had an inner IOException with a message of "Cannot locate resource 'resources/camera32x32.png'." The siteoforigin syntax also throws a XamlParseException , but the inner exception is a DirectoryNotFoundException , and says "Could not find a part of the path."
I have tried several things without luck here, and I've run out of ideas. Can someone help to point me down the right path, and tell me how I can reference an embedded resource from a xaml page?
Gil Yoder
Houston, TX
|
|
|
|
|
I lucked upon an answer to my own question with more research. Having the image in the Resources.resx file was not sufficient to reference the resource with the pack URI. I needed to set the properties of the file to be a resource, or configured to copy to the output directory. I had neither.
By setting the files to "resource" I was able to get the URI to work even after remove all of the files from the RESX file.
[url=http://www.forum-signatures.com][img]http://www.forum-signatures.com/wizard/Sigs/2010/final132825116615.png[/img][/url]
|
|
|
|
|
Good Morning to for all,
please send the silver light all topics with partical marials.
|
|
|
|
|
I'm sorry, but I don't understand. What are partical marials? I appreciate that English isn't your first language, so perhaps if you could link to a Wikipedia page or something like that, I might understand what you are talking about.
|
|
|
|
|
|
|
I'm trying to check to see if a WCF service is running, and if not, exit. So far I have this:
bool serviceRunning = true;
try
{
Proxy = new MyAppServiceRef.MyAppServiceClient();
}
catch (Exception e)
{
serviceRunning = false;
}
try
{
serviceRunning = !Proxy.ServiceRunning();
}
catch (Exception e)
{
serviceRunning = false;
}
if (!serviceRunning)
{
string message = "The service appears to not be running. Please check the service. " + ApplicationTitle + " will now exit.";
MessageBox.Show(message, "Service Error", MessageBoxButton.OK, MessageBoxImage.Stop);
Application.Current.Shutdown();
}
1) is this really the way to do this?
2) After the call to Application.Current.Shutdown() the app continue to run and I get XAML errors. How to I actually stop the app dead right here?
Thanks
If it's not broken, fix it until it is
|
|
|
|
|
hello
I say first that this code works with windowsFormApplication, but no work with wpf, help me please
namespace WpfApplication22
{
public partial class App : Application
{
[DllImport("user32.dll", CharSet = CharSet.Auto)]
static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, IntPtr lParam);
private const int APPCOMMAND_XXX = 0x80000;
private void MetodoMute(object sender, EventArgs e)
{
SendMessageW(this.Handle, WM_APPCOMMAND, this.Handle,
(IntPtr)APPCOMMAND_xxx);
}
}
}
when I use:
private void button4_Click(object sender, RoutedEventArgs e)
{
App x = new App();
x.MetodoMute(new WindowInteropHelper(this).Handle);
}
not works, It's launch exception:
"Eccezione non gestita di tipo 'System.InvalidOperationException' in PresentationFramework.dll
Informazioni aggiuntive: Impossibile creare più di un'istanza System.Windows.Application nello stesso AppDomain."
how do I call a method written in App.xaml.cs from another window?
|
|
|
|
|
App is a special class - it's the entry point for your WPF application. In other words, it's the class you use to create your application - the good news is that this class is available throughout the code base, so all you need to do is use App.MetadoMute (also, you need to use a method call that matches your signature).
|
|
|
|
|
I can not use App.MyMetod(...) in the file MainWindow.xaml.cs
don't work
how do I call a method written in the class App from the class MainWindow?
private void button4_Click(object sender, RoutedEventArgs e)
{
App.MetodoMute(new WindowInteropHelper(this).Handle);
}
|
|
|
|
|
You can use Application as your class to call MetodoMute. You simply cast it to App.
|
|
|
|
|
New here. I hope I don't get lambasted for asking this here and being a little long winded. I have a twenty some year career as a programmer(RPGLE)IBM. About a year ago I took a few classes on c# and then was taught a little about WPF. And was able to add some controls and stuff to some existing apps in our shop. Loved it. Then I found out we weren't exactly doing WPF the correct way. I want to change and go into .net full time. My problem is.. Everybody has a different opinion on what is the right way to do it. I am currently going through Pro WPF in C# by Matthew McDonald. I REALLY want to learn this and be able to find a job doing this. In my old world of programming, I learned the basics and really took off. Once I got a good shell of a program and or screen I used that to reuse code, expand into more complex applications and continue to learn from repetition. I feel like if I can get a good example of a correct WPF application I can easily catch on like I did in my old career. I learn by repetition. And getting examples of hello world and junk isn't what I'm looking for. I need to learn real world techniques... I am interested in business apps with database(SQL) behind. Binding and such. Am I way off base here ? Please share your thoughts, it will be much appreciated. I will not be this long winded again. Thanks!
|
|
|
|
|
Go to the Articles section here on CodeProject[^] and you will find lots of great articles that will teach you all you need to know.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Ya, thanks. I've been doing that all over the net. I create something and then people say its wrong... Painful. I guess I'm looking for a little clearer direction.
|
|
|
|
|
ljv_az wrote: I guess I'm looking for a little clearer direction. That's a little more than can be provided in a technical forum. You need to study the subjects of interest using books, online articles, as I already suggested, and maybe even a course of some kind.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Ok. I don't mean to be an ahole but did you read my original post? I have started developing a few WPF applications. I HAVE read books and taken some direction from videos and from other so called ".net developers". What I'm looking for is some clearer direction on how to get a good start the "right" way to develop WPF apps. Example... I see people using coordinates and sizes to layout their WPF window. Then I was told that is wrong. Only used mins and max's and padding. I use Visual Studio when designing my window or form. I was told that is garbage and I should hand key in the XAML for things like my grid rows and columns. On and on... So I was looking for an example of a small app that was done correctly and I could look at it and see how its done and use that as a good start for doing more complex apps the way WPF was inteneded to be used. I just find it a bit frustrating when you come across an example of a WPF app and then you start reading all the responses to the posting of that app and other people say it's wrong.
|
|
|
|
|
ljv_az wrote: What I'm looking for is some clearer direction And that's what I directed you towards: the CodeProject contains lots of great articles, many specific to WPF. If you are expecting a full tutorial on the 'proper' way to write WPF applications then I'm afraid you misunderstand the purpose of these forums, and should read again How to get an answer to your question[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I'm done with the discussion. I didn't asked for a tutorial. Your being an idiot. I was asking for clarification and pointed out specific points of needed clarification but you just want to be an ahole. I'll gladly go somewhere else. I've been in the programming business for over twenty years I'm not stupid. I was simply looking for some clarification. There are alot of good people with alot of good help on discussion boards but there is always some wise ass. Thanks.
|
|
|
|