w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Umbraco usercontrol: Get usercontrol.property.Id within the usercontrol itself?
Running round controls in a page or a usercontrol is simple enough (http://msdn.microsoft.com/en-us/library/20zys56y(v=vs.90).aspx) As is getting the properties of an object ((http://msdn.microsoft.com/en-us/library/aky14axb.aspx)) EG Running round the properties of any text boxes: ControlCollection controls = this.Controls; foreach(Control control in controls) { if (control.GetType().ToString() == "System.Web.UI.WebControls.TextBox") { // if this is the control you are interested in you can loop round its properties // something like foreach (var prop in control.GetProperties()) {

Categories : Asp Net

how does a custom control in a usercontrol find the parent of the usercontrol in WPF?
Changing such stuff on a parent control directly from a child is generally frowned upon. Why don't you make this event in your child control a bubbling RoutedEvent to let the parent in the visual tree handle the event and action accordingly as it see's fit. Some helpful links: How to: Create a Custom Routed Event Extensive - Routed Events Overview Sample: A demo showing your use case where the MainWindow holds a UserControl which holds another UserControl within it and the MainWindow handles the custom event raised by the grand child UserControl. Download Link

Categories : Wpf

ASP.NET UserControl error - 'is not a member of 'System.Web.UI.UserControl'.'
I think WithEvents variable 'header' conflicts with property 'header' in the base class 'Page' and should be declared 'Shadows'. is creating problem. Try to resolve this error and see what happens.

Categories : Asp Net

Need to set DataContext of a UserControl from another UserControl both of which are on same WPF page
You can create a layout along these lines... <DockPanel> <Button DockPanel.Dock="Top" Content ="EDIT" Height="30" Width="150" Click="ButtonBase_OnClick" /> <TextBlock DockPanel.Dock="Top" Name="Control1" DataContext="{Binding}" Background="Yellow"/> <TextBlock DockPanel.Dock="Top" Name="Control2" Visibility="Collapsed" Background="Green"/> <Rectangle DockPanel.Dock="Top"></Rectangle> </DockPanel> And in the click handler, you can set the data context of the second control... private void ButtonBase_OnClick(object sender, RoutedEventArgs e) { Control2.DataContext = Control1.DataContext; Control2.Visibility = Visibility.Visible; } This snippet makes the secon

Categories : Wpf

Acess UserControl inside another UserControl
You should not access controls like that, unless you have no other choice. In your case, iF you what to expose selected DateTime in your first user control, then simply declare a Dependency Property which will hold and update this value (via DataBinding or event).

Categories : C#

WPF userControl containing an image image doesnt resize when usercontrol is resized
You seem to be setting a width and height in your code behind... this is the size that the Image will be. Instead of this, try setting the Image.Source property in xaml: <UserControl x:Class="WpfApplication1.UserControl1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300"> <Grid> <Image Source="/WpfApplication1;component/Images/ImageName.png" /> </Grid> </UserControl> If I put this into MainWindow.xaml, the Image resizes when resizing the Window. If you need

Categories : C#

Adding Sharepoint List Item to Windows form list
Completely untested, made fresh while drinking morning coffee. Good luck! var list = siteWeb.Lists.TryGetList(listName); if (list == null) { return; } var items = list.GetItems(query); var countOfItems = items.Count; if (countOfItems == 0) { return; } var listItemFieldObjects = items.Cast<SPListItem>().Select(item => item[1]); foreach (var item in listItemFieldObjects) { var listViewItem = new ListViewItem("Object's value"); listView.BeginUpdate(); listViewItem.SubItems.Add(item.ToString()); listView.Items.Add(listViewItem); listView.EndUpdate(); }

Categories : Sharepoint

long list in c# windows phone.What are the ways to display LISTs in windows phone?
The idea of a ListBox/LongListSelector is to show a list of items that wouldn't fit on the screen at once. The user can scroll through all the items so it sounds like it's doing what you'd expect it to. If each item is too long for your deign plans then you have to change your item template design.

Categories : C#

get list of logged on users on remote windows computer from a list computer
It (csv file) should be formatted as follows: computername server1 server2 server3 'Computername' is the column name. This can be derived from the code snippet as the Foreach-Object refers to the ComputerName property.

Categories : Windows

How to display a list of windows in WPF
Your thinking is correct, you need to create an ItemTemplate for the ItemsControl. Each item in the ItemsControl will be of Type Window and you need to expose the Title property in the template <ItemsControl.ItemTemplate> <DataTemplate> <TextBlock Text={Binding Title}/> </DataTemplate> </ItemsControl.ItemTemplate>

Categories : C#

Get all list of assemblies in Windows 8 C#?
There is no exact equivalent available in Windows Store apps for a good reason: these apps are distributed as packages and there is no way to extend them with plugins, i.e. you know exactly which assemblies an app is comprised of, when you deploy it. To get the assemblies distributed (included in your project), you will first need to reference them from your main project. Then you could use the following code to iterate through all assemblies in the package installed location, load them and iterate through their types (you should add some exception handling before you use this code in production): var folder = Package.Current.InstalledLocation; foreach (var file in await folder.GetFilesAsync()) { if (file.FileType == ".dll") { var assemblyName = new AssemblyName(file.Disp

Categories : C#

How to add footer to the list box in windows phone 8
I'll go ahead posting the logic as My code might not match with yours So 1 -> Save the server data in an array or a list. 2 -> Design the xaml in a way that the Parent Grid has two or more rows with the last row for the show more. And the one before for the list. (Adjust height accordingly) 3 -> Populate it with a limited amount of data. 4 -> Next use the ListBox.Items.Add(data) method to add the data to the list. Keep sorted property off so that the elements are inserted at the bottom of the list -> Go through the link Add Method for Observable Collections Use step four on the show more button click .. and also adjust the height of the list or put it into a scrollviewer so that limited height scrolling can be done . olease update if further queries

Categories : Windows Phone 8

Add contact list on windows phone 8
try this code ... longlist selector works fine on panaroma ... just change the list binded with your own list and make the datatemplate according to ypour wish it will work fine ... <phone:PanoramaItem Header="first item"> <!--Single line list with text wrapping--> <phone:LongListSelector Margin="0,0,-22,0" ItemsSource="{Binding Items}"> <phone:LongListSelector.ItemTemplate> <DataTemplate> <StackPanel Margin="0,-6,0,12"> <TextBlock Text="{Binding LineOne}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" FontSize="{StaticResource PhoneFontSizeExtraLarge}"/> </St

Categories : C#

How can I create a scrollable list in my windows 8 app?
Try ListBox. If there are more elements than ListBox´s size, there will appear a scrollBar. More informations about ListBox

Categories : Xaml

how to save a list in windows phone 8
The following link has some really great videos. I started off on using them. There is one video which does pretty much exactly what you want, I think it's at the bottom of page 4, and the continuation on page 5, but can't quite remember. But you should check several of them out, there really great. Channel 9 - Windows phone for beginners I would also suggest you looking at this website which contains nice clear info about IsolatedStorage: All about IsolatedStorage In fact the GeekChamp website is really good for finding out how to do things after you've started understanding more about Windows Phone and C#

Categories : List

databinding to a int list "windows phone 8"
I'm not sure what the issue is. Bind your ListBox, ItemsControl, or whatever, to the list, then bind the width of your rectangle to the current item (by setting an empty binding expression): <Rectangle Width="{Binding}" />

Categories : C#

Windows App Certification Kit does not load any app to list
I was able to fix the problem by installing W.A.C.K. 3.0 http://msdn.microsoft.com/en-us/windows/apps/bg127575.aspx I made a blog post about it

Categories : Windows

List of modules in Windows X64. ProcessModuleCollection
I am nut 100% sure but you will probably have to use EnumProcessModule. There is a filter option LIST_MODULES_32BIT in there. Just take a look at http://msdn.microsoft.com/en-us/library/windows/desktop/ms682633(v=vs.85).aspx. You may also want to take a look at the C# signature at http://www.pinvoke.net/default.aspx/psapi.enumprocessmodules. EDIT: For Windows XP CreateToolhelp32Snapshot should be sufficient with the TH32CS_SNAPMODULE32 flag. http://msdn.microsoft.com/en-us/library/windows/desktop/ms682489(v=vs.85).aspx

Categories : C#

Haskell list drives in Windows
import System.Process c = do res <- readProcess "wmic" ["logicaldisk","get","caption"] "" --print res -- clean up the output print $ init $ map (take 2) $ drop 1(lines res)

Categories : Windows

Blank Windows Feature list when loading through C#
Try specifying a platform target corresponding to your OS platform. I assume the computers that run into this problem are 64 bit machines and your application runs in 32bit mode. So try specifying either platform target = AnyCpu AND disable the checkbox "prefer 32 bit" or set the platform target to 64bit.

Categories : C#

Retrieve list of menu items in Windows in C++
Here's a code snippet that you can modify according to your needs: void InterateMenu(HMENU hMenu) { MENUITEMINFO mii; int i, nCount = GetMenuItemCount(hMenu); for (i = 0; i < nCount; i++) { memset (&mii, 0, sizeof(mii)); mii.cbSize = sizeof(mii); mii.fMask = MIIM_SUBMENU | MIIM_TYPE | MIIM_ID; // | MIIM_STATE if (!GetMenuItemInfo(hMenu, i, TRUE, &mii)) continue; if ((mii.fType & MFT_STRING) != 0 && mii.cch > 0) { mii.cch++; TCHAR *pString = (TCHAR *) malloc(mii.cch * sizeof(TCHAR)); if (pString != NULL) { if (!GetMenuItemInfo(hMenu, i, TRUE, &mii)) { free(pString); continue; } TRACE

Categories : C++

I need to get the list of all the windows displayed or hidden in the desktop
You can get a list of child windows with XQueryTree XQueryTree - query window tree information Status XQueryTree(Display *display, Window w, Window *root_return, Window *parent_return, Window **children_return, unsigned int *nchildren_return); So, to get a complete list, you'll have to start with the root window and recursively call it for all the children of each window.

Categories : C++

Create list or arrays in Windows Batch
There is no 'array' type in batch files, which is both an upside and a downside at times, but there are workarounds. Here's a link that offers a few suggestions for creating a system for yourself similar to an array in a batch: http://hypftier.de/en/batch-tricks-arrays. As for echoing to a file "echo variable >> filepath" works for echoing the contents of a variable to a file, and "echo." (the period is not a typo) works or echoing a newline character. I think that these two together should work to accomplish what you need.

Categories : Windows

i need a list view example program in windows phone 8
Here's the simplest example I could come up with. I've also added handling for contacts without any phone numbers. xaml: <phone:PhoneApplicationPage x:Class="so17564250.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" FontFamily="{StaticResource PhoneFontFamilyNormal}" FontSize="{StaticResource PhoneFontSizeNormal}" Foreground="{StaticResource PhoneForegroundBrush}" SupportedOrientations="Portrait"> <Grid x:Name="LayoutRoot" Background="Transparent"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/>

Categories : C#

Windows 8 javascript app: How to list all settings stored by the app
You can use a for in loop to iterate over all keys in the object: for (var key in roamingSettings.values)

Categories : Javascript

How to list all media files in windows phone 7?
Use the MediaLibrary class. Here's an example of how to retrieve all the songs in the media library and play the first one. http://msdn.microsoft.com/en-us/library/windowsphone/develop/microsoft.xna.framework.media.medialibrary.aspx

Categories : C#

array list databind xaml windows 8 unsuccesss
You have to bind properties of class dashboard1 with the UI controls. Suppose you are showing all the properties , in TextBlock then bind textbox's text property with property of class dashboard1. So code will be like this. <TextBlock Text={Binding sectionName} />

Categories : Misc

Using Azure how do you list blobs in a container for Windows phone 8?
Hello yes the toolkit has been deprecated the other way is I think that you can start using the Windows Azure Mobile Services: http://www.windowsazure.com/en-us/develop/mobile/ if you previously have worked on Windows Azure Node JS then you can easily build a new Windows Azure Mobile API that do the required action which is listing the blob and call this API from your Windows Phone application. here is the resources of the NodeJS and how it uses the Windows Azure Blob Storage: http://www.windowsazure.com/en-us/develop/nodejs/how-to-guides/blob-storage/ to integrate it with the Mobile Services, just fo to your portal, create new Windows Azure Mobile Services and under API enter the NodeJS Code. here is a link demonstrating how to work with it: http://weblogs.asp.net/scottgu/archive/20

Categories : C#

Serializing and deserializing a list of objects in a Windows Phone 8 app
I'm using these methods to Save and Load from a XML file in/to the IsolatedStorage : public static class IsolatedStorageOperations { public static async Task Save<T>(this T obj, string file) { await Task.Run(() => { IsolatedStorageFile storage = IsolatedStorageFile.GetUserStoreForApplication(); IsolatedStorageFileStream stream = null; try { stream = storage.CreateFile(file); XmlSerializer serializer = new XmlSerializer(typeof (T)); serializer.Serialize(stream, obj); } catch (Exception) { } finally { if (stream != n

Categories : Windows Phone 8

print the text box value in list view in windows phone 8
you will have to add a item source of the list box .. List<data> asd = new List<data>); asd.Add(new data(textBlockNumber.Text,DateTime.Now)); myList.ItemSource = asd; make a data class public class data { public string liststing {get;set;} public DateTime datetime {get;set;} public data(string textblocktext,DateTime date) { this.liststring = textblocktext; this.datetime = date; } } then bind the text of textblock in xaml like Text="{Binding liststring}" and your other Text="{Binding datetime}" i hope it helps ...

Categories : C#

How to add NEXT and PREVIOUS buttons after all the items to list box in windows phone 8
You could put your ListBox inside another ListBox, where the items are the result ListBox and the buttons, e.g: <Grid x:Name="ContentPanel" Grid.Row="3" Background="White" Margin="0,-3,0,0"> <ListBox x:Name="outerList"> <ListBox x:Name="companiesList" Height="{Binding ActualHeight, ElementName=ContentPanel}" SelectionChanged="companiesList_SelectionChanged" ScrollViewer.VerticalScrollBarVisibility="Auto"> <ListBox.ItemTemplate> <DataTemplate> <Grid x:Name="listItem"> <Grid.RowDefinitions> <RowDefinition Height="50"/> <RowDefinition Height="30"/>

Categories : Xaml

Convert ArrayOfString to List in C# for Windows Phone 7
If ArrayOfString is truly a basic array of string types, you can do the following: string[] names = { "John", "Doe" }; List<string> namesList = new List<string>(names); // OR List<string> namesList2 = new List<string>(); foreach (string name in names) { namesList2.Add(name); }

Categories : C#

trying to create a list of deserialized data windows phone
Check carefully this place CreationDate = news_items[i].CreationDate.Substring(0, news_items[i].CreationDate.IndexOf('T')), LastUpdateDate = news_items[i].LastUpdateDate.Substring(0, news_items[i].LastUpdateDate.IndexOf('T')), DisplayUntilDate = news_items[i].DisplayUntilDate.Substring(0, news_items[i].DisplayUntilDate.IndexOf('T')), I suppose one of your dates just in wrong format and has no "T"

Categories : C#

How to save list picker selected data in windows phone
The problem is at the line: postData.AppendFormat("&{0}={1}", "retailer",HttpUtility.UrlEncode(this.RetailerList.SelectedItem.ToString())); this.RetailerList.SelectedItem will return the BestinukRetailers object. What you need is the retailername property of that object. To retrieve it, simply cast the object to its original type: var retailer = (BestinukRetailers)this.RetailerList.SelectedItem; postData.AppendFormat("&{0}={1}", "retailer",HttpUtility.UrlEncode(retailer.retailername));

Categories : PHP

Pull To Refresh with Long List Selector Windows Phone 8
You can accomplish this with the ItemRealized event and using a ListHeader (or ListFooter to pull from bottom). Within the ItemRealized event you check if the item is your header object. If it is then load more items. From the Windows Phone Dev Blog The ItemRealized event is raised every time a LongListSelector item acquires a UI container to be displayed on the screen. In other words, every time an item enters the UI buffers above or below the current viewport, the ItemRealized event is raised. The event argument property ItemKind indicates whether the UI container is an Item, ListHeader, GroupHeader, or ListFooter. Using the property Container.Content you can get the actual object associated with the UI container that was realized. This way you can monitor the objects within the UI

Categories : C#

How to view List of Available WIFI Networks Programatically in Windows Phone8 App
It is not possible to get a list of available WiFi networks via any of the public APIs. It will not be possible to build the app you describe on Windows Phone. The ability to view available WiFi networks and choose the one to connect to is already included in the phone settings.

Categories : Dotnet

unable to bind JSON data to list in windows phone 8
your deserialization should be var example = JsonConvert.DeserializeObject<List<readqueriesObject>>(json); No need for listreadqueries PS: your json is an array, not an object cotaining array ({queries:[...]})

Categories : C#

List all files with certain extensions in Windows folder in a single call
Use a space to separate the file masks: dir /b *.csv *.xsl *.txt > results.txt Note that you can also sort the output, and the sort is applied across the entire list. For example, to sort by name: dir /b /o:n *.csv *.xsl *.txt > results.txt

Categories : Batch File

In EMACS on windows how to keep some files fixed in Recent File List?
Set the length of the recent files list to a high number. For example: (setq recentf-max-saved-items 1000) This way the makefiles won't drop out from the list if you visit them regularly. Also it is useful to keep a long recentf list and use a package which allows you to open files from it with completion. Here you can find some ways to do that: http://www.emacswiki.org/emacs-es/RecentFiles

Categories : Emacs

GitHub for Windows - I commit and sync, but list of uncommit changes stays
Potentially silly question (especially given you are using a GUI), but are you sure you are committing from the correct location? I've fallen victim to the same thing and it happens when I have multiple SSH windows open in and I accidentally try to commit from live (as opposed to dev) after just having pulled. This fails in the same way you describe as live is never ahead of the repo. I've kicked myself for not seeing it quickly before.

Categories : Windows



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.