Menu
  • HOME
  • TAGS

How to create bottom to top slide menu like app bar in Windows Phone

wpf,xaml,silverlight,windows-phone-7,windows-phone-8

Developing view transitions from scratch is no easy feat, but luckily enough, there are pre-written libraries that can do this for us. The best that I have found so far is called Transitionals. You can download the dll from the Transitionals page at CodePlex.

Checkbox auto uncheck

silverlight,checkbox,datagrid,radio-button

Check your bindings,I ran into similar error due to wrong bindings. If that doesn't resolve the issue, check for event bubbling.

Subclass a silverlight templated control

c#,wpf,silverlight,control,custom-controls

Found the mistake. I'd to remove default style from sub-classed control. And through this answer found out that I'd to declare the editor part control in style of the subclass inside a ContentTemplate (DataTemplate) rather than Content Modified Editor style and class code public static readonly DependencyProperty EditorControlTemplateProperty = DependencyProperty.Register(...

How to connect to CRM 2015 on-premise from a Siverlight App without depending on the Context?

c#,silverlight,dynamics-crm-2015

The code applies to Dynamics CRM 2011 and uses function getServerUrl. The function was declared obsolete for CRM 2011 already and has been removed from Dynamics CRM 2015. Luckily you only have to make a small modification to the sample code: public static Uri GetServerBaseUrl() { string serverUrl = (string)GetContext().Invoke("getClientUrl");...

Enable icons in listpicker

xaml,silverlight,windows-phone-8,windows-phone

Do you have Toolkit.Content folder in your project? That's where these icons should be. Did you use NuGet to include Toolkit into you project or downloaded it manually?

Cannot create an instance of the abstract class or interface on WCF Silverlight Service

c#,wcf,silverlight

You should be creating an instance of the generated proxy client class. It'll be named DataServiceClient() if it's been added correctly....

get error wcf when return data?

c#,wcf,silverlight

As per your screen of stack trace System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException So I believe this might be due to lazy loading or EF proxy serialization. Try disabling the proxy. [OperationContract] public List<Drug> GetAll_Drug() { List<Drug> obj_Lst_t; using (var ctx = new EpriscriptionContext()) { ctx.Configuration.ProxyCreationEnabled = false; // disable proxy creation here. obj_Lst_t =...

Scraping Data from Silverlight Control within Browser

silverlight,excel-vba,screen-scraping

Silverlight has the capability to make certain objects available to JavaScript calls so that JavaScript developers can affect the Silverlight application externally. These are called "Scriptable Objects". further reading: https://msdn.microsoft.com/en-us/library/cc645085(v=vs.95).aspx My understanding is that this feature is available in SL4 and SL5. ...

Windows Phone make pushpin icon move on map between start and end location

c#,wpf,silverlight,windows-phone-8,dictionary

You have a couple of challenges here. The updated location will not be able to tell you the path that the user took travelling from A to B, so animating curves etc will be difficult. Initially I would suggest you change your MovementThreshold to 0 so that you get as...

Does the Silverlight player support H264/MultiView Coding (3D) Videos?

silverlight,mediaelement.js,ms-media-foundation

Quick Answer: 'Absolutely' I will take a quick hack at this question, only because I use Media Foundation a great deal, and I believe your question is mostly focused on Media Foundation's support for 3D video. I have not used Silverlight's player, nor have I utilized the 3D video capabilities...

Lots of namespace/assembly reference build errors - Windows Phone 8.1 Client App

c#,web-services,wcf,silverlight,windows-phone-8.1

The problem appears to be a External Service linked to localhost which very probably wasn't running on the other machine. Please link your project to a Service located in a remote location reachable from both computers or run the Service application in each computer you want to test your project.

WrapPanel grabs focus from its children

c#,xaml,silverlight

Somehow its working fine for me. sharing the code snippet of what I tried. <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> <Image Name="img" Height="100" Width="100"/> <TextBox Name="tb3" Text="text2" KeyDown="tb3_KeyDown" Width="200"/> </Grid> <ScrollViewer Grid.Row="2"> <toolkit:WrapPanel Orientation="Vertical" Name="wp"> </toolkit:WrapPanel> </ScrollViewer> Adding textboxes from code behind TextBox tb2 = new TextBox(); // Constructor public MainPage() {...

Simple WCF service not getting called after deploying on different machine, however works fine on my local system

wcf,silverlight

Thanks Roy & Nitin. Actually the issue was on setting up endpoint address in web.config file and also as the services was getting deployed in other machine, the URL of the application was getting changed. So i made some important changes given below: 1. Gave the endpoint address, endpoint name...

Can't submit XAP file in Windows Phone Store

c#,silverlight,windows-phone-8,submission,windows-phone-store

.appx files are generated if you develop Windows Store apps (Windows 8/8.1) and as far as i know also Universal Apps. it seems like you develop for Windows Phone! 8/8.1. What you get after compiling is a .xap-file. When you log in to your developer account (https://dev.windows.com/en-us/dashboard) you can decide...

Insert a blank row into a Datagrid with dynamic columns

c#,silverlight,datagrid

Okey, let me clear up some confusion before we proceed: Since the columns are dynamic and are only known in runtime, I need to create an entity whose attributes can be set in run time. Not necessarily, you can use a list of objects. I thought of converting my ProdCatList...

how to check if a string is matched with another string

silverlight,windows-phone-8

In this case string a being the given string and b being the to be matched string. string a = "abcdefghi"; string b = "abcdefghi"; char[] c = a.ToCharArray(); char[] d = b.ToCharArray(); if(b.Take(b.Length).SequenceEqual(a)) { // success } ...

Silverlight authentication using Active Directory

c#,silverlight,authentication,active-directory

See this article on WCF services with Windows Authentication and Silverlight.

Windows Phone 8.1 Silverlight Unique device Id

c#,silverlight,windows-phone-8.1

I have found an answer to the question. It turns out that I can use the Windows.Phone.System.Analytics.HostInformation.PublisherHostId method, but I have to check the ID_CAP_IDENTITY_DEVICE capabillity in WMAppManifest.xml file. That file can be found under Properties of Windows phone 8.1 Silverlight application.

Not able to collapse the first row in datagrid in Silverlight

silverlight,datagrid

I got the issue fixed. I am populating the datagrid through an asynchronous call. So there is no way to check whether this call is completed or not. My collapse method will be called before completion of populating data in datagrid. So found a solution from one of the sites....

Silverlight 5 fails the first time to consume a Web API 2 [clientaccesspolicy.xml]

c#,silverlight,asp.net-web-api,httpclient,webclient

Finally, with the help of this article I could get the answer. ConfigureAwait(false) prevented navigate on the result, and of course the task was canceled due to long wait under the wire. ... ().Wait() and ConfigureAwait() will have other more worthy uses, my mistake was thinking that without them it...

How to know active control within XAML designer?

xaml,silverlight,design-time

There are two possible ways you can approach this: The hard way (Visual Studio Designer support) You best shot at this is to review the WPF Designer Extensibility documenation, and also have a look at how DesignTime support for the TabControl is implemented. In design time, the Designer has some...

Compose Email with attachment on Windows Phone 8.1 Silverlight application

c#,silverlight,windows-phone-8.1

Thanks @Will for hint. Here's a working code: private StorageFile storageFile; private async void ComposeEmail(String subject, String messageBody, StorageFile fl) { var msg = new EmailMessage(); msg.Subject = subject; msg.Body = messageBody; msg.To.Add(new EmailRecipient("[email protected]")); String attachmentFile = fl.Name; if (fl != null && attachmentFile != "") { try { var...

Reusable button with datatrigger in Silverlight

xaml,silverlight,windows-phone-8

How about an approach with Style converter? Say we add custom Converter: public class ArrowBtnStyleConverter : IValueConverter { public Style EnabledStyle { get; set; } public Style DisabledStyle { get; set; } public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { //put your conversion logic here instead of...

Is it possible to create a good mix of MVC and Silverlight?

asp.net-mvc,silverlight

I've just gone through something similar. The solution I applied was to host the Silverlight application in a separate iframe and hide/show the iframe depending on the navigation type. This did present some issues because in some browsers (Chrome), if you actually hide the Silverlight object it disposes it. I...

Is the Stroke a circle?

c#,silverlight,windows-phone-8.1

I guess that depends on your definition of "circle". It's unlikely a user will draw an actual circle, though they might come close. So first, you need to define a specification for "circle". Here's one that might work: The drawn shape is a closed curve. I.e. the final point is...

How to add access-control-allow-methods to method in C# POST

c#,silverlight,post,windows-phone-8.1

for future help client.DefaultRequestHeaders.Add("Access-Control-Allow-Methods", "POST"); ...

ContentControl (CheckBox) does not inherit Foreground

xaml,silverlight

The best I could find is this, which may be an explanation: Property value inheritance behavior is not globally enabled for all dependency properties, because the calculation time for inheritance does have some performance impact. Property value inheritance is typically only enabled for properties where a particular scenario suggests that...

Style vs inline property setting in silverlight with a custom control

c#,wpf,xaml,silverlight

That is not the correct way to register a dependency property. public bool UseCustomTooltips { get { return (bool)GetValue(UseCustomTooltipsProperty); } set { SetValue(UseCustomTooltipsProperty, value); } } public static readonly DependencyProperty UseCustomTooltipsProperty = DependencyProperty.Register("UseCustomTooltips", typeof(bool), typeof(MyControl), new PropertyMetadata(false, new PropertyChangedCallback(MyCallbackMethod))); Use the propdp snippet, it really is a beautiful thing....

How To Reference a Com Object in a WCF Service

wcf,silverlight,com

Presumably your COM component was build as 32bit...so when you register it is registered as a (InProc) 32bit COM component....(and can only be loaded by a 32bit application). Your ASP.NET Website is most likely running in an AppPool that is set to be 64bit...thus it can't use the 32bit COM...

How to get number of buttons in an Windows Phone application bar

c#,silverlight,windows-phone-8.1,application-bar

First, you don't need a for loop to add the button, since you're adding only one: ApplicationBarIconButton scrollToToday = new ApplicationBarIconButton(); scrollToToday.Text = "idag"; scrollToToday.IconUri = new Uri("/Assets/AppBar/today_dark.png", UriKind.Relative); parent.ApplicationBar.Buttons.Add(scrollToToday); Then, if I understand correctly, you want to remove the last button if there's more than one. If so, you...

Silverlight Nested Custom Controls results in StackOverflowException

c#,xaml,silverlight,controls,stack-overflow

I stumbled upon that splendid effect myself, and as it turned out: You can't instantiate an object derived from UIElement (your line <local:Control1/> tries exactly this) in a ResourceDictionary (and generic.xaml is one), because all objects in said dictionary must be shareable. Documented here. Relevant section: Shareable Types and UIElement...

Getting Full Exception Trace for Silverlight 5 WCF Service

c#,.net,wcf,silverlight

use this : <serviceBehaviors> <behavior name=""> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> </serviceBehaviors> and see this: https://msdn.microsoft.com/ru-ru/library/ee844556(v=vs.95).aspx and...

Silverlight: Web does not exist in namespace

c#,asp.net,xaml,http,silverlight

The reference you are trying to add is to the Web API component of the ASP.NET framework (details), which enables you to author an API and host it in ASP.NET. This is not what you want, and not compatible with Silverlight. Unfortunately, Silverlight does not provide the full set of...

scroll able Checkboxes in windows 8 silver light Phone app

c#,xaml,silverlight,windows-phone-8

The easiest way to achieve your goal is to use StackPanel inside ScrollViewer. So it would look like this: <Grid x:Name="LayoutRoot"> <ScrollViewer> <StackPanel> <CheckBox Content="Checkbox 1" /> <CheckBox Content="Checkbox 2" /> <CheckBox Content="Checkbox 3" /> </StackPanel> </ScrollViewer> </Grid> However, make sure that 55 check boxes won't affect performance of...

Sketch Filter - windows phone 8.1 silverlight using C#

c#,xaml,silverlight,windows-phone-8.1

The Lumia Imaging SDK has a SketchFilter you can use. Here's a quick function which will apply a SketchFilter to wbIn and return the filtered image in wbOut using Lumia.Imaging; using Lumia.InteropServices.WindowsRuntime; using Lumia.Imaging.Artistic; ... async Task FilterWriteableBitmap(WriteableBitmap wbIn, WriteableBitmap wbOut) { using (var imageSource = new BitmapImageSource(wbIn.AsBitmap())) using (var...

Why is SetTarget a static method of Storyboard

c#,.net,silverlight

The use of static methods threw me at first when I encountered Silverlight/WPF. The data is actually stored on the Timeline, and not elsewhere, but why static methods, and not just methods on the Timeline object itself? The reason is this: most WPF/Silverlight elements have a lot of properties: backgrounds,...

Draw line in ComboBox in Silverlight

c#,silverlight,graphics,line

I see from your code that you didn't set Line's Stroke color. Try setting it to black (and don't forget to add ComboBox to some container): var lineTypeComboBox = new ComboBox { Width = 40, Background = Background, Margin = new Thickness(0), Padding = new Thickness(0) }; lineTypeComboBox.Items.Add(new Line {...

Read a JSON File using silverlight

silverlight

Yes this can be done with some minor changes: public static void Main(string[] args) { WebClient client = new WebClient(); client.Headers["Content-Type"] = "application/json"; client.OpenReadCompleted += new OpenReadCompletedEventHandler(client_OpenReadCompleted); string url = @"C:\Users\YourNameHere\Documents\Visual Studio 2013\Projects\TestingApp\TestingApp\Copy.json"; client.OpenReadAsync(new Uri(url, UriKind.Absolute)); } private static void client_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e) { StreamReader reader = new...

Silverlight set cursor to Cursors.Wait

c#,multithreading,silverlight

I have managed to get this working by this code: ThreadingHelper.Invoke(() => { var page = (MainPage)Application.Current.RootVisual; page.Cursor = cursorStyle; }); But maybe someone will offer more type-safe method?...

CaptureSource.Start() throws System.UnauthorizedAccessException in Windows Phone Silverlight 8.1

c#,silverlight,windows-phone-8.1

First, it looks like you're trying to add that capability to Package.appxmanifest instead of WMAppManifest.xml. You should be able to find WMAppManifest.xml under Solution Explorer -> <your project> -> Properties: Opening that file should give you the option to add ID_CAP_* capabilities. Second, you need to specify both ID_CAP_ISV_CAMERA and...

What is an Acceptable Data Size to be Transfered using a Hidden Field

c#,asp.net,xml,wcf,silverlight

If the 160k will only make one trip from the server to the client, then I see no need to use anything more than a hidden field. If the page were going to be "posted back", so that the 160k would also go back to the server and then maybe...

Hide tooltip for all page controls Silverlight

c#,xaml,silverlight

I can't find a convenient way offered by the Silverlight ToolTipService itself. I can think of two possible solutions: First solution: Introduce a coding rule for your project that basically says: all ToolTip Bindings shall either use the SwitchOffConverter (if their source is the DataContext) or have a SwitchOffTextResources object...

SignalR in WebFarm

wpf,silverlight,signalr,webfarm

Your theory is correct. SL OOB client receives messages only from web clients connected to the same server as SL OOB client. This is known SignalR architecture limitation. Only way to fix it is to use something called backplane to connect all the servers to single message bus See Introduction...

How do I get the child controls of a ListBox?

c#,xaml,silverlight,listbox

Like you say this is probably best done in the ViewModel but you can select all the sub list items in code behind using VisualTreeHelper. private void StuffListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { var stuffListBox = (ListBox)sender; ListBoxItem item = (ListBoxItem)stuffListBox.ContainerFromItem(stuffListBox.SelectedItem); ListBox sublist = FindVisualChild<ListBox>(item); sublist.SelectAll(); } FindVisualChild Method as per...

Automatically Expand RowDetails of Newly Added Rows of a RadGridView

c#,wpf,xaml,silverlight,radgridview

Ok, based on your comments I won't answer "How to access [...] resources [...]?" but try to give an answer for "How to automatically expand RowDetails of newly added rows of a RadGridView?". I recommed a custom Behavior for your RadGridView that listens for newly added rows and performs the...

Send the user to my other apps, Windows Phone button

c#,silverlight,windows-phone-7,windows-phone,windows-phone-store

There is no direct method, but you can perform a simple search over the marktplace and you will get all the apps from a developer by his name on the store. MarketplaceSearchTask marketplaceSearchTask = new MarketplaceSearchTask(); marketplaceSearchTask.SearchTerms = "developer-username"; marketplaceSearchTask.Show(); Here a list of available Tasks you might look into:...

Entity Framework make a field required based on data

c#,entity-framework,silverlight

Unfortunately, it is not possible to do what you want. Think how the underlying schema works, it defines what must be true for every record of the table. You'll have to enforce that requirement via the business logic of your application....

Communicate with the serial port from client web browser.

javascript,node.js,silverlight,serial-port,japplet

Well, One way to do this is develop a chrome app. You can use chrome.serial API. https://developer.chrome.com/apps/serial Sample Code, In your manifest.json, { "name": "Serial Sample", "description": "Read/Write from/to serial port.", "version": "1.0", "manifest_version": 2, "permissions": ["serial"], "app": { "background": { "scripts": ["background.js"] } } } In your background.js, const...

Receive WNS push notfication on Windows phone silverlight 8.1

c#,silverlight,azure,windows-phone-8.1,azure-mobile-services

On Client side: Ideally, to use WNS, you should remove all references to MPNS from WMAppManifest.xml and add the info provided by Windows Store to your package.appxmanifest. I understand that you are migrating from WP8 to WP8.1. So in your package.appxmanifest, edit the code so that it looks like this:...

StoreTest Kit Windows Phone 8.1

silverlight,visual-studio-2013,windows-phone-8.1,beta-testing

Maybe this link provides useful information. If you are developing a Windows Phone 8.1 app: You must install and run Windows 8.1 or Windows 10 Insider Preview. You must install Windows App Certification Kit version 3.3 or version 10, which is included in the Windows SDK for Windows 8.1. You...

Silverlight onLoad event doesn't fire in Firefox or Safari

javascript,silverlight,firefox,safari

Ok, so the error was my own. The initParams parameteter for the createObject method needs to be a string, not an object for the Silverlight plugin to initialize correctly in Firefox and Safari (see below). IE doesn't seem to bother. Silverlight.createObject( "silverlight/MediaPlayer.xap?verison=16012013", _container, "silverlightControl", params, { onError: onSilverlightError, onLoad: onSilverlightLoaded...

Silverlight: Get first TextBox in DataTemplate

vb.net,silverlight,datatemplate,children

You are approaching the problem incorrectly. Accessing the DataTemplate and searching for a TextBox will get you nowhere. The template is only a blueprint, only when it is used somewhere (like for each item in your ItemsControl) its content is instantiated (once for each item). One of several possible solutions...

How to properly deal with Silverlight deprecation?

javascript,google-chrome,silverlight,cross-browser,npapi

It's a shame no one had a better suggestion. In the end I was able to write a pure JavaScript replacement for our Silverlight control. Since IE10 and IE11 still had poor performance for the I/O operations, I decided to detect them to fall back to the Silverlight control. <!--[if...

How to get the locations of all the points on a line WP8.1 Silverlight c#

c#,silverlight,windows-phone-8.1

This is simple math. You know the starting and ending point of the line, meaning you can calculate any point you want on that line, by using the equation of the line. The way to get the equation is y = y1 + [(y2 - y1) / (x2 - x1)]...

Windows phone silverlight socket HostNotFound error

c#,sockets,silverlight,windows-phone-8,windows-phone-8-emulator

I was able to successfully run your code on the Windows Phone 8 emulators targeting one of my network machines. The socket.ConnectAsync call is already an Async request that wouldn't block your UI so I don't think you require the manual steps to manage thread synchronization. But if you insist...

Siverlight: DataGridView adding items and getting selected items

c#,silverlight,datagridview

You don't need to bind your data with the data grid view like that at all. (By using DataTable). Instead you you can make a list of your models and directly bind it to the item source of the grid view. For example: // Example Model public class MyModel{ public...

asynchronous UI update from ViewModel in WPF

wpf,silverlight,sharepoint,mvvm,telerik-grid

You could add a public reference to the Dispatcher of the UI Root Visual (your main window/user control) in the App class (App.xaml.cs), and possibly inject it when instancing your view model. I suggest you to use a MVVM framework like MVVM Ligh toolkit, that already solves the problem in...

Could not load type 'Telerik.Windows.Documents.Packaging.DeflaterOutputStream'

c#,wcf,silverlight,telerik

Issue was due to mismatch version of Telerik.Windows.Documents.FormatProviders.Pdf.dll and Telerik.Windows.Documents.

Different default sorting order for columns in Silverlight DataGrid

c#,silverlight,sorting,datagrid

You've got two options here, that I can see. You can extend ObservableCollection with custom sort functions for the grid in question. You can see how to do that here. Your other option involves customizing the grid with hyperlink buttons in the header. You can then capture the click and...

Getting content of checkboxes in xaml.cs in Silverlight

xaml,silverlight

I will explain what happens and how to solve: 1.- You are getting the datatemplate not instances of the datatemplate, in case you want to manage the instances you can do by using the Loaded Event to add items to the List to create and update for instance a List....

How to generate OData v4 Client for Silverlight 5?

silverlight,asp.net-web-api,odata,generator,odata-v4

Silverlight does not support the code generated by Microsoft's OData v4 Client Code Generator visx (OData Client T4), but no one's forcing you to use generated code. Simply use the lib of your choice to create a connection to the OData service and reuse your own types (business objects)....

How to create the “Binding” class in that code?

c#,silverlight

As per MSDN Binding Class Binding Class provides high-level access to the definition of a binding, which connects the properties of binding target objects (typically, WPF elements), and any data source (for example, a database, an XML file, or any object that contains data). Namespace: System.Windows.Data Assembly: PresentationFramework (in PresentationFramework.dll)...

CRM 2015 and Silverlight

silverlight,dynamics-crm,dynamics-crm-2015

Microsoft abandoned Silverlight a couple of years ago, in favour of HTML5. Silverlight is not supported on all platforms (mobile to begin with) and it does not fit in the cross-platform/execute-anywhere strategy Microsoft follows nowadays. Microsoft may not say this out loud, but Silverlight can be seen as legacy and...

Windows Silverlight or RT. What are the implications for windows phone development

c#,silverlight,windows-phone-8

The short answer is stick with universal app and winrt. That is the future of windows development. You will get much better code reuse and the framework is designed from the groundup to be completely asynchronous. Silverlight is more of the legacy way of doing things and i suspect it...

ActionNotSupportedException occurred after change EndpointAddress

c#,wcf,silverlight,silverlight-5.0,wcf-binding

that is very easy. you have to generate code exactly same with Web.Config. you must be use the below code: System.ServiceModel.EndpointAddress endpointAddress = new System.ServiceModel.EndpointAddress("net.tcp://YourIpAddress:4502/CTMSEngine/net"); System.ServiceModel.Channels.CustomBinding customBinding = new System.ServiceModel.Channels.CustomBinding(); System.ServiceModel.Channels.BinaryMessageEncodingBindingElement BMEelement = new System.ServiceModel.Channels.BinaryMessageEncodingBindingElement();...

Windows Phone 8 Silverlight JSON Deserealize

c#,json,silverlight,serialization

It looks like you posted your JSON to http://json2csharp.com/ and used the classes in provided -- good so far. But then you nested them in some outer class Zwave and tried to deserialize that, which is not correct. You need to do: var returned = JsonConvert.DeserializeObject<Zwave.RootObject>(json); Or better yet, remove...

How do I access MainPage class non-static members from the App class?

c#,wpf,xaml,silverlight,windows-phone-8.1

I would solve this problem using Reactive Extensions (RX). You can add Reactive Extensions (RX) to your project using NuGet, search for rx-main and install Reactive Extensions - Main Library. Both of your pages would access a common class which would have a Subject<T>. One page would publish events to...

windows phone 8.1 silverlight calendar

xaml,silverlight,windows-phone-8.1,controls

You could take a look at the Calendar control for WindowsPhone Silverlight from ComponentOne. You could download it from https://www.componentone.com/Downloads/Download/?downloadID=133 and refer to its documentation at : http://helpcentral.componentone.com/nethelp/WPCalendar/

Getting template view visible to outside parameters

c#,xaml,silverlight,templates

When you create custom Controls or Views and you want them to have some (technical) interface so that you can use xaml markup or code to interact with your custom type, I recommend you add public DependencyProperties. Imagine you have a control MySpecialGrid public class MySpecialGrid : Control { ctor()...

How to read or write MP4 file from file stream in silverlight and vb.net application?

vb.net,silverlight,streaming,video-streaming,mp4

I found the solution, just for reading mp4 files we need binary reader This is how i did - saveFileDialog1.Filter = "MP3 Files (*.mp3)|*.mp3|MP4 Files|*.mp4" saveFileDialog1.ShowDialog() Dim words As String() = soundFileSelected_Name.Split(".") Dim fileExtension As String = words(1) Using audiofs As System.IO.FileStream = saveFileDialog1.OpenFile() If fileExtension = "mp3" Then Dim...

Silverlight: DataGrid.SelectedIndex always getting -1

c#,silverlight,datagrid

You cannot save Init params between sessions with the approach you posted. Here is an article describing how you can read the init params and store them in the isolated storage. They are not supposed to be set by your code like you did here: Application.Current.Host.InitParams["CurrentRow"] = dataGrid1.SelectedIndex.ToString(); [Edit] Ok,...

How can i add an account to Windows Phone?

silverlight,windows-phone-8,settings,account

Not possible to add an account programatically with the current SDK.

Convert StorageFile to WriteableBitmap WP8.1 Silverlight

c#,silverlight,windows-phone-8.1

This code works for me. if (file.Count > 0) { foreach (StorageFile f in file) { ImageProperties properties = await f.Properties.GetImagePropertiesAsync(); WriteableBitmap bmp = new WriteableBitmap((int)properties.Width, (int)properties.Height); bmp.SetSource((await f.OpenReadAsync()).AsStream()); // Ready to go with bmp } } ...

Why does Silverlight View not throw a null exception?

c#,silverlight

I thought that the binding still tried to get a reference when the view is first initialized, is this not the case? The binding process is designed to handle null values and will check the initial target reference which is given and not attempt any action if null. Remember...

List.BinarySearch Windows Phone

c#,silverlight,windows-phone-7

Since compare is based on the word, you can create new instance with input word and pass it to the BinarySearch method: List<ShortWord> words; int index = words.BinarySearch(new ShortWord() { Word = text, }; if (index >= 0) { ShortWord result = words[index]; } Accoring to MSDN, BinarySearch will use...

c# how to load pictures from picture library, WP8.1 Silverlight

c#,silverlight,windows-phone-8.1

Change int i = 0; to int i = 1; Assuming there are 10 files in that folder the foreach will go through 10 times but the first time it will look for face0.jpg and only ever get to face9.jpg....

Windows phone store update app package on same app version?

c#,silverlight,windows-phone-7,windows-phone-8

If you are updating the package, update the version, so users know that they have the latest version. https://msdn.microsoft.com/en-us/library/windows/apps/gg442301(v=vs.105).aspx https://msdn.microsoft.com/en-us/library/windows/apps/ff769509(v=vs.105).aspx...

Evaluate Binding Path Dynamically in Silverlight in XAML

silverlight,data-binding,silverlight-5.0

You can use a custom behavior: <SomeControl> <Interaction.Behaviors> <DynamicBindingBehavior TargetProperty="Content" BindingPath="{Binding DisplayMemberPath}"/> </Interaction.Behaviors> ... </SomeControl> and the code: public class DynamicBindingBehavior : Behavior<DependencyObject> { private string m_targetProperty; public string TargetProperty { get { return m_targetProperty; } set { m_targetProperty = value; TryFindTargetProperty(); } } private DependencyProperty m_targetDependencyProperty; private void...

Click through a transparent image in WPF or Silverlight

c#,wpf,silverlight,transparency

You mut set IsHitTestVisible to false on the image, then clicks go through.

String to Double Conversion (Comma to dot issue)

c#,xml,wpf,silverlight,type-conversion

It is because Replace method returns new string with replaced characters. It does not modify your original string. So you need to reassign it: kursS = kursS.Replace(",","."); ...

Silverlight - XamlParseException The type 'Type' was not found

xaml,silverlight,xamlreader

You have a Silverlight project. Silverlight does not support the markup extension x:Type. Ancestor bindings in Silverlight look like this: {Binding Path=Foo, RelativeSource={RelativeSource AncestorType=UserControl}} [Edit] And btw you can't bind to ActualWidth. You have to observe the SizeChanged event and have some handling code. You will find quite elegant solutions...

Tile title on Windows Phone 8.1 Silverlight app

c#,silverlight,windows-phone-8,windows-phone-8.1

As it happens sometimes, right after asking the question I figured out what is causing the issue. It seems like the project just had to be rebuild completely in order for the the tile titles to show up properly. No wonder I couldn't find any info on this in the...

Updating a property inside a LINQ clause breaks databinding to UI

c#,linq,xaml,silverlight,data-binding

You only fire NotifyPropertyChanged when you set a new value to the DeliveryAccuracyTotals field. You don't fire the event when the list is mutated, only when an entirely new list is set. Were the property to be an ObservableCollection then the UI would be able to add a handler to...

Silverlight WCF services not returning any data from database, after deploying on server

wcf,silverlight

Actually the issue was on setting up endpoint address in web.config file and also as the services was getting deployed in other machine, the URL of the application was getting changed. So i made some important changes given below: 1. Gave the endpoint address, endpoint name and Contract details in...

Xaml - Binding in FallBackValue

c#,xaml,silverlight,binding,telerik

I can think of at least two ways: First Solution (solved in the DataContext): Add a property to your DataContext type, something like ResolvedFirstName and the value is either taken from FirstName or FirstName2, and when either of the two is changed the ResolvedFirstName is re-evaluated. public string ResolvedFirstName {...

TextBox doesnt have IsReadOnlyCaretVisible Property

wpf,silverlight,windows-phone-8

When you develop Windows Phone 8.0 (Silverlight) you should use following doc site: https://msdn.microsoft.com/library/windows/apps/ff402535.aspx In the Silverlight you have only available TextBox.IsReadOnly property TextBox doc - TextBox IsReadOnly doc TextBox IsReadOnly remarks: If the text box is read-only, no user input or edits are allowed, but programmatic changes can be...

File access with C++ on WindowsPhone 8.1 Silverlight

file,silverlight,dll,windows-phone-8.1

OK, I solve it. It's funny, I put a file in the assets folder, Let's say the name of the file is Blah.yyy It works well on WP8.1 WRT project, But it didn't work properly on WP8.1 SL project. But after I rename it to Blah.png, The C style file...

How Does the Silverlight Client Talk to the Server in a 3 Tier Lightswitch Application?

c#,silverlight,visual-studio-lightswitch,3-tier,lightswitch-2012

If the IIS Server is correctly set up, you should just be able to use a browser to download and install the current version of the desktop application (with correct configuration) from it. The url format for the request is: http[s]://{servername}[:port]/{applicationname}/ If you're not sure of the application name, use...

Best practice for setting boolean flags

c#,asp.net,wcf,silverlight,ria

Go with nullable. If its HasValueequals false, go check the db. Setting it to null in the constructor isn't necessary, as it is the default.

How to create custom controls using generic.xaml in Silverlight 5 without using WPF?

silverlight

What you describe is called a Templated Control in Silverlight. You have to provide three things: a class containing your control's logic a default Style with a ControlTemplate an entry in generic.xaml that includes the default Style Example: MyFeeblefezer.cs public class MyFeeblefezer : Control { public MyFeeblefezer() { DefaultStyleKey =...

Consume REST API's from SilverLight application

rest,silverlight,silverlight-4.0

You can't if the web service and Silverlight applications are on different domains. See this link for more information http://www.devtoolshed.com/explanation-cross-domain-and-client-access-policy-files-silverlight...

Draw line with high StrokeThickness in silverlight

c#,xaml,silverlight,line,stroke

I think you are going to be charmed with my answer: Point _drawingStart; bool _isDrawing; private void startDrawing(object sender, System.Windows.Input.MouseButtonEventArgs e) { _drawingStart = e.GetPosition((UIElement)sender); InitializePath(); _isDrawing = true; } private void stopDrawing(object sender, System.Windows.Input.MouseButtonEventArgs e) { _isDrawing = false; } private void doDrawing(object sender, System.Windows.Input.MouseEventArgs e) { if (_isDrawing)...

Change icon in validationsummary in silverlight

.net,xaml,silverlight,validationsummary

The icon is encoded in the ValidationSummary's HeaderTemplate. The original template is available here (Search for <Path Fill="#DDD43940" Data="M5.5,2.5 L7.5,2.5 L7.5,8 L5.5,8 M5.5,9.5 L7.5,9.5 L7.5,10.5 L5.5,10.5"/> - this is the exclamation mark). Here's an example of how to customize the header: <ctl:ValidationSummary> <ctl.ValidationSummary.HeaderTemplate> <DataTemplate> <Border Background="#FFDC020D"> <StackPanel Orientation="Horizontal"> <Image Source="/MyCustomImage.png"...

How to set CheckBox margin dynamically in Silverlight

c#,silverlight,margin

Why do all this visual GUI operations in the code behind when there are Xaml constructs/controls that do the same thing? To do this dynamically in Xaml...here are the steps. First off, the StackPanel can evenly space out the checkboxes in a horizontal fashion instead of using a grid then...