Wpf - Find Out When A New UIElement Is Added In Silverlight?

Apr 18, 2009

I am designing a user control in sliverlight that inherits from canvas. It is necessary for me to find out when a new UIELement is added to Children property of MyBase but there is no event like "ItemAdded". Since I want to animate the children of my canvas, I can not use LayoutUpdated event (It is hit a million times).

View 2 Replies


ADVERTISEMENT

Operator Is Not Defined For Types UIElement And UIElement?

Mar 7, 2012

I translate from C# some code into VB.NET, (WPF, .NET 4)[code]How is it possible, that in C# the operator is defined, but in VB.NET - NOT(?)

View 1 Replies

Find Out Wherer A Mouse Button Is Pressed When Mouse Pointer Is Leaving A UIElement?

Apr 6, 2011

I've been working on a GUI in WPF which I'm fairly new to, having only used Windows Forms up until now. So far, my GUI is very simple: it contains two rectangles, each of which drops a shadow. The shadow creates an effect of rectangles "floating above the canvas" so to speak.

When one of the rectangles is pressed, the myRectangle.MouseDown event is handled such that the shadow goes away, thus creating an effect of the rectangle being pressed down onto the canvas, like a button.Similarly, when mouse button is released, the myRectangle.MouseDown event is handled such that the shadow reappears and the rectangle "floats" again. This behavior make them resemble buttons. Note, there a reasons I want them to be rectangles and not custom buttons.

[Code]...

If the pointer leaves a rectangle while mouse button is pressed, I'd like shadow to reappear. This is arguable simple, because theoretically in this case, any time myRectangle.MouseLeave is raised, the shadow should come back on, even if it was already there.If the pointer left a rectangle when mouse button was pressed, then came back while before the button was released, I want the shadow to disappear again. This one is what gives me problems. No idea how to do this.

View 1 Replies

See If A Passed Uielement Has A Particular Property?

Apr 2, 2009

I need to see if a passed uielement (control) has a particular property like borderthickness, itemsdources, backgroundcolor and so on

View 2 Replies

Find Dynamically Added Control?

Jun 13, 2011

I've created a new tabpage and also added a richtextbox to it:

Private Sub AddTab(ByVal ctrl As TabControl, _
ByVal text As String)
If Me.InvokeRequired Then

[Code].....

I know the name is rigth cause I have printed the name in the create method and I have printed the name string in the code where I try to access it.

So by the looks of it it seems .Item() is not the right way to access the control.

So how to access to dynamically created control?

View 1 Replies

VS 2008 Cannot Find Control Added In Design

Sep 26, 2011

At some point in the past, I have added a TabControl1 to my Form in design, now I can't find. I need to view it so I can make some changes. I have looked in the 'Document Outline' and is not there as well. However, the control must be somewhere because it works fine when I run the program.

View 2 Replies

Port WinForms To Silverlight 2 Or Silverlight 3

Mar 19, 2009

I have a LOB app written in VB.NET with a WinForms front-end and SQL back-end. After many months weighing up how to get onto the Web, I decided last month to use Silverlight 2. Now, Silverlight 3 Beta is out, but there is no end-user runtime.

Does anyone know when the runtime will be available for deployment of SL 3 apps onto client sites?
My dev timeline is about 3 months: should I persist with SL 2 and then u/g to SL3, or jump straight in to SL3?

View 5 Replies

Control Added On The Fly Is Added To The Wrong Location Of An Auto-scroll Panel?

Jun 21, 2010

I have a program that adds controls on the fly to an auto-scroll panel. When the panel is scrolled (viewing the bottom of the panel for example) and a control is added, it looks like it is added assuming the top left corner of the panel is still at 0,0 when in fact it may be 0,500. To see what I am talking about, create an empty "Windows Forms Application" project and insert the below code into it.

Friend WithEvents Panel1 As System.Windows.Forms.Panel
Friend WithEvents btnAdd As System.Windows.Forms.Button
Dim ButtonCount As Integer

[code]......

View 4 Replies

Dynamic Added Textbox To Status Bar And Added Event

Jun 10, 2009

i have multiple forms in a project and all have statusbar. there is no way to add textbox on status bar but in my previous thread i got the help to add the text box. i created a function in module so that i call that function from all the forms on load and add the textbox on status bar and also add the event on textchange. the function to be called on event change is in individual form (at present)[code]

View 11 Replies

Original DataTable Object Has Columns Added When Variable Has Columns Added?

Oct 6, 2011

I have a datatable property called prpParametersTable in a class called clsBatch. I have a procedure that sets a datatable variable called dtP equal to prpParametersTable at the beginning of the procedure. I then add three new columns to dtP.Here is my problem. When I add the three new columns to dtP my original table prpParametersTable also gets those columns added to it, why? I only want to add the three columns to dtP and not prpParametersTable. How can I do that?

Private Function prvfnc_InsertBatchParameters(ByRef cnn As SqlConnection, ByRef trans As SqlTransaction) As String
' set new columns that have BatchID, Insert DateTime, and UserID for the SQLBulkCopy method below
Dim clm As DataColumn
Dim dtP As DataTable = clsBatch.prpParametersTable

[code]....

View 1 Replies

.net - Multibinding In Silverlight?

Jul 13, 2011

I am trying to implement multibinding in Silverlight using VB.Net. I have found a very good reference for an implementation in C# here. I spent some time trying to use various converters to migrate it into VB.Net but I still didn't get it working properly. So..

I'm looking for some references that exemplify how MultiBinding can be done in VB.Net. Also an example using Silverlight 5 beta would be fine (I read in a post right here on Stack Overflow that it supports multibinding).

View 1 Replies

.net - Write XML In Silverlight With VB?

Apr 4, 2009

is it possible to write xml in silverlight with vb

View 5 Replies

C# - WCF And Silverlight CrossDomain.xml?

Jul 1, 2010

if this has been asked before (I couldn't find the answer anywhere), but I have a WCF Service Application that I have created, and am trying to access via my Silverlight 4 app. I have added the service reference to the SilverLight App and am just trying to call one of the default pre existing methods on the service (GetData). When calling the method i get an error of:

[Code]...

View 3 Replies

How To Us Silverlight Player On VB

Feb 12, 2011

How can i use SilverLight Video Player on Visual basic 2010

View 1 Replies

Navigation In Silverlight 3 With VB?

Feb 8, 2010

I am designing a web application in Visual Studio 2010 Beta 2, using Silverlight 3, with Visual Basic as the underlying programming language. What is the Visual Basic code that I would put in a Button1_Click event to tell the program to navigate to another UserControl XAML file?

View 4 Replies

Use Custom DLL In Silverlight?

Mar 21, 2012

I'm testing and trying to understand how to create a DLL and call a function from it in my Silverlight project. I'm getting an exception: Unable to find an entry point named 'WriteTextFile' in DLL 'C: empTestDLL.dll'.[code]...

View 1 Replies

.net - Calling WCF Service From Silverlight 4?

May 6, 2011

I call upon your combined intellects. I have a web application with a silverlight app that calls a ria service. The ria service is defined inside the web application and everything else is just dandy.

The issue is this.It is my understanding that in order for the silverlight application to talk and know what the ria service is, you need to add a service reference for that service. The service reference defines the ria service and sets up the connection binding. One of the files it adds is the ServiceReference.ClientConfig which has the connection binding in it. During the course of this application's development, this is the way it was set up. And it worked perfectly fine locally and on the dev server.

Unfortunately there were issues when deploying to the clients in-house server. At this point I was onto other projects while my co-worker continued with the deployment. He soon became frustrated with the goofy errors that were occurring and recruited some help. This dev came in and, albeit got it working, but in order to do so he removed the service reference from the silverlight project but left the ServiceReference.ClientConfig which pointed to the location of the service in the web application(but that's it, no definition or explanation as to what the service does and I'm not sure how the silverlight app is supposed to know how to work with it..). This works perfect on my co-workers workstation and he has deployed this version to the clients server fine.

When I open the project it doesn't run at all. And the reason why is that it doesn't know what the service is that i'm using in code. Specifically, it doesn't know where this is (names changed for clarification):

Imports SilverlightApp.ServiceReference.WebApp.Service

I have cleaned the solution, completely deleted and got the latest from source control, built the web app first and made sure the asp.net dev server was running so that the address in the ServiceReference.ClientConfig resolved correctly. But, alas, it still doesn't know what Imports SilverlightApp.ServiceReference.WebApp.Service is.

So, to get it working on my workstation, I added the ServiceReference back but kept the current connection bindings so that it matched the endpoint in the web app web config. and changed the import statement to Imports SilverlightApp.ServiceReference and everything works fine.

View 1 Replies

.net - Silverlight MaxItemsInObjectGraph Behavior?

Jan 27, 2011

I currently have a silverlight application which has silverlight class library. The silverlight class library has a WCF service reference which works as expected for small data. However we have come across a problem which is caused by the default value of maxItemsInObjectGraph. We have tested it with an increased value (called from vb app set in behaviour) and it works however we are unsure how to set the value of maxItemsInObjectGraph when it is in a silverlight class library (as it is only defined in the clientconfig file and no services are added to the client). I have seen posts about adding it to the web.config but this only seems to apply when the service is called directly by the app not by a class library?

View 1 Replies

.Net Silverlight Project And MySQL?

Mar 20, 2012

I have found the MySQL .NET Connector - am I correct that this is not compatible with Silverlight and I do not need it?I understand I must use a Web Service for this. Can I use WCF or WCF RIA, or am I best using a more traditional web service method like REST or SOAP?

What's the best web service method for many quick queries (such as updating a search as the user types in the keywords)Do I have to use technology like LINQ, Entity SQL, ADO.NET Framework, or a stored procedure? Is one of these the best way to do it or should I just skip them all and create a simple web service?What's the best source to learn how to do specifically Silverlight VB.NET and MySQL and learn to do it the best way as explained above. Everything I've found (books and websites) seems to be in C#, not a Silverlight product, or just uses built in SQL Server support. For our web app, we need to be able to give the buyer not just access to our client side application via a browser but also the server side so they can OPTIONALLY host the entire product themselves. We're hoping to have one installer for them on their server (so they wouldn't have to set up php or mysql to host the product for example). If I use a VB.NET website and web service, will that deploy as just an exe or dll so the user won't have to install anything special?

View 1 Replies

Asp.net - Use Silverlight To Play Audio?

Aug 23, 2010

how to use Silverlight to play audio from local ASP.NET folders?

View 1 Replies

C# - Building A Roguelike In Silverlight (or WPF)?

Dec 10, 2009

I've been toying with the idea of building a web-based Roguelike game using Silverlight (or maybe just a desktop game using WPF).

If you don't know what a Roguelike is, it's a type of graphical RPG where the graphics are rendered using text. Because the graphics engine is relatively simple, you get to spend your time building features into the game and it's possible for one person to quickly build something fun.

For instance, a typical screen might look something like this (the @ is the player, # is a wall, the other characters are things like monsters, stairs, and items):

I'm an experienced ASP.Net dev and I'm just getting started with Silverlight. Is there a particular approach I should take for this? To provide some background, in Winforms, most standard approaches are too slow -- the text ends up updating with a visible, ugly blink. I'm thinking something to do with the Canvas might be appropriate, but even better would be to somehow draw a screen into a buffer and then instantly flip that onto the screen so that it becomes visible instantly.

But I don't really want to mess around with DirectX right now - I'm hoping WPF can get me to where I need to be without a big learning curve.

Update: So this turned out to be pretty challenging. I tried a lot of different approaches and I was finally able to get it to actually render fast enough, but I think that to make it blazing hot fast you should probably build a sprite map of the font you want to use and work from that instead of trying to use any of the built in font rendering stuff. I didn't do that.

When I got the core rendering engine done, I ended up with some annoying artifacts related to quirks of font rendering (even fixed width fonts are sometimes a liiitle bit wide...), and when I finally worked that out I discovered libtcod, which is a very impressive roguelike engine that has a C# wrapper. That's all console based. I played with it a little and I was blown away.

As of 1.5.1, everything I've touched in libtcod works great except for the mouse input stuff and one of the keyboard input modes (which I think they recently ditched), but everything you need to make a roguelike is in there, and that includes several line-of-sight, pathfinding, and even dungeon generation algorithms. It's pretty advanced visually. Have you ever seen an RL like this?

In a nutshell, it's possible to build a roguelike with silverlight, but I wouldn't go in expecting it to be easy unless you've already got a strong silverlight or game dev background. You're going to be re-inventing some serious wheels, and even with a powerful toolkit that allows to focus on gameplay, there's no shortage of things to do.

View 2 Replies

C# - Getting Started With Matrix3D (Silverlight)?

Jul 9, 2010

I need to figure out a way to project pictures in Silverlight (<Matrix3D/>) based on some predetermined variables that I have available to me.I have a need for the following projections:

Isometric
Orthographic
Oblique
Perspective

So, I have a number of variables provided to me like X, Y and sometimes Z. For example, this -

Type: Orthographic
X: 70°
Y: 10°
Z: 20°

somehow turns this -> into this -> and

Type: Isometric
X: 314.7°
Y: 35.4°
Z: 299.8°

into this ->

I have other information, like the coordinates of where the picture appears on a canvas, it's width/height, etc. if that information is useful too.

View 2 Replies

C# - SilverLight Datagrid Refresh?

Jan 18, 2011

I have a Silverlight Datagrid who's DataSource I refresh every 5 seconds.I would like when the grid refreshes, for the focus to be on the last row, not the first.I have tried setting the SelectedIndex property of the grid to be the last row, but it did not work.

The details:I am binding the DataGrid to an ObservalbleList(Of MyObject) property on it's ViewModel, and the SelectedIndex is also a property on the ViewModel. Both properties raise the property changed event (able to witness this working by seeing the DataGrids DataSource clearly changing, but the SelectedIndex is never set.I have read reports that setting the SelectedIndex on a DataGrid is a known issue, but have not found a work around.

View 1 Replies

C# - Silverlight Window Boundaries?

Aug 13, 2010

say your silverlight area on a webpage is 200px by 200px.you open a child window, is there a way to make it moveable outside the 200x200 silverlight area?or say you drop down a combo box, let the drop down go out side of the 200x200 aea?

View 1 Replies

C# :: Silverlight UserControl Library?

Nov 16, 2011

I created a usercontrol in a silverlight library. This control will be used among several different projects. It uses a reference to a third party dll. When I try and drag the control from the toolbox it throws an error about finding the third party control.If i add a referene to my application to the third party and then add my control it works fine. My question is there any way that when i add this usercontrol I can force it to add the thrid party reference to the project its being added to first?

View 2 Replies

Char.ConvertFromUtf32 Not Available In Silverlight

Oct 12, 2010

I'm converting a WinForms app to Silverlight (VB.NET). What should I use instead of Char.ConvertFromUtf32 as it's not available to use in Silverlight?

View 1 Replies

Compiling DLL For Silverlight 3.0 With VBCodeProvider?

Oct 14, 2009

I am having difficulty dynamically compiling a DLL for use with Silverlight 3.0. My goal is to take some rules provided by my users and compile them into a DLL for custom editing purposes.I created a Silverlight class library project in Visual Studio to get the command line for compiling a Silverlight class library. Based on that and the many examples for compiling VB using the VBCodeProvider, I came up with the following method for comping code in a string to a DLL:

Public Function Compile(ByVal code As String, ByVal assemblyName As String) As CompilerResults
' set the compiler parameters
Dim parameters As CompilerParameters = New CompilerParameters()
parameters.OutputAssembly = assemblyName

[code]....

This does not compile with the following error:vbc : Command line (0,0) : error BC2010: compilation failed : 'Member 'IsNumeric' cannot be found in class 'Microsoft.VisualBasic.Information'. This condition is usually the result of a mismatched 'Microsoft.VisualBasic.dll'.'

I've looked and, in fact, the Silverlight version of the class Microsoft.VisualBasic.Information does not contain member IsNumeric. So I appear to be picking up the correct libraries using the sdkpath option. But I have no idea why I'm trying to call that method in the first place.how to successfully compile source code dynamically into a Silverlight compatible class library?

View 1 Replies

Download A File In Silverlight?

Oct 12, 2010

I want to download a file in Silverlight. It works in normal VB just fine:

VB-Download
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim wclient As Net.WebClient = New Net.WebClient()
AddHandler wclient.DownloadStringCompleted, AddressOf ListDownloaded

[code]....

It utterly fails. At the bottom of Firefox it SAYS the file is downloading, but NOTHING happens other than that...

View 4 Replies

Facebook Like Button With Silverlight?

Oct 27, 2011

I have created a silverlight app that consits of like buttons within specific usercontrols (all in one asp page). Ie.foodingtons.net/index.aspx?id=211

It is all incorporated within the silverlight app on one page. Hence when the control is loaded the meta tags are updated and the like button is placed within an iframe and linked to the appropriate page. When the like button is pressed a javascript function is invoked which changes a picture behind the silverlight obj. This picture in theory should be used as the default image after the like button is pressed (on clients page). But it seems to be stuck on old images. Ie. foodingtons.net/index.aspx?id=211(the above is using an image which doesnt even exist)foodingtons.net/index.aspx?id=218(is using an image from the main page)foodingtons.net/index.aspx?id=219(fails.. the website is inaccessable)

I have also tried create the open graph tags with in the page to reference new images but to no avail.

I'm using the following facebook tool to debug as well[URL]..

View 2 Replies

Implementing MVVM In Silverlight?

Nov 11, 2009

IM Looking at Implementing MVVM in Silverlight.Kind of new to Silverlight and I'm Definately new to MVVM Pattern.I get it all But I want A set of small Prism VB.Net MVVM exmaples if that makes sense.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved