 |
 |
Index ‹ Visual Studio ‹ Visual Studio Source Control and SourceSafe
|
- Previous
- 1
- 2
- Visual Studio Extensibility MPGG Unexpected errorThis is the error I get when compiling the parser.y file. It is the modified parser.y file from ManagedMyC example. The parser.y file is attached to this post.
"G:\Program Files\Visual Studio 2005 SDK\2006.09\VisualStudioIntegration\Tools\bin\MPPG.exe" Generated\parser.y > obj\Debug\parser.cs Unexpected Error Collection was modified; enumeration operation may not execute.
Can anyone help me
Thanks, Zvonko
%using Microsoft.VisualStudio.TextManager.Interop %namespace Babel.Parser %valuetype LexValue %partial
/* %expect 5 */
%union { public string str; }
%{ ErrorHandler handler = null; public void SetHandler(ErrorHandler hdlr) { handler = hdlr; } internal void CallHdlr(string msg, LexLocation val) { handler.AddError(msg, val.sLin, val.sCol, val.eCol - val.sCol); } internal TextSpan MkTSpan(LexLocation s) { return TextSpan(s.sLin, s.sCol, s.eLin, s.eCol); }
internal void Match(LexLocation lh, LexLocation rh) { DefineMatch(MkTSpan(lh), MkTSpan(rh)); } %}
%token IDENTIFIER NUMBER STRING %token ABORT ADDBRANDINGIMAGE ADDSIZE AUTOCLOSE %token SECTION FUNCTION SECTIONEND FUNCTIONEND %token TRUE FALSE %token LEFT RIGHT TOP BOTTOM
%token EQ NEQ GT GTE LT LTE AMPAMP BARBAR %token LEX_WHITE LEX_COMMENT LEX_ERROR
%left '*' '/' %left '+' '-'
%%
Program : Declarations ; Declarations : Declaration Declarations | Declaration error { CallHdlr("Expected Declaration", @2); } | /* empty */ ; Declaration /* might need an init action for symtab init here */ : Declaration_ ; Declaration_ : GlobalBlock | SectionsD | FunctionsD ; SectionsD : SectionD SectionsD | SectionD error { CallHdlr("Expected Section", @2); } | /* empty */ ; SectionD : SECTION IDENTIFIER SectionBlock SECTIONEND | SECTION SectionBlock SECTIONEND ; FunctionsD : FunctionD FunctionsD | FunctionD error { CallHdlr("Expected Function", @2); } | /* empty */ ; FunctionD : FUNCTION IDENTIFIER FunctionBlock FUNCTIONEND ; SectionBlock : AbortD | AddSizeD ; FunctionBlock : AbortD ; GlobalBlock : AddBrandingImageD | AutoCloseD ; /****************** FUNCTION DEFINITION ******************/ AbortD : ABORT | ABORT STRING ; AddBrandingImageD : ADDBRANDINGIMAGE Position NUMBER | ADDBRANDINGIMAGE Position NUMBER NUMBER ; AddSizeD : ADDSIZE NUMBER ; AutoCloseD : AUTOCLOSE Boolean ; /***************** GLOBAL DEFINITIONS *****************/ Boolean : TRUE | FALSE ; Position : LEFT | RIGHT | TOP | BOTTOM ; %%
- 3
- Windows Presentation Foundation (WPF) Xaml auto-completion?
|
I've VS2005 with the latest "orcas" upates. Why VS xml editor doesn't help me with hints on code tags and attributes like it does while i edit configuration files I'm already opening it with xml editor and if i digit < i receive only:
<!-- <![CDATA[]]> <
This looks strange to me. :-\ | |
- 4
- Windows Communication Foundation ("Indigo") dataContractSerializer with msmqIntegration?
I have basetype datacontract with knowntype attributes of subclass type marked. it has no problem work with netTCP, namePipe,msmqBinding, but it gives error with msmqIntegrationBinding.
Is it dataContractSerializer can't be appied to msmqIntegration due to the interop reason if so, how to pass around subclass types with msmqIntegrationBinding, any example
thanks
- 5
- 6
- Visual Studio Setup and Installation Brace Highlighting and BackgroundI actually just installed VStudio 2005 and am editing C++ code and the only brace highlighting I get is when I type a new } , but it matches in black that is really hard to determine between it and a regular one, there is no option to set the background, only the brace color. Also, is there a way to make it match just by clicking next to the }
- 7
- Windows Presentation Foundation (WPF) Filter Inner List Property
Hello,
I have done a test to see how WPF is handing entity binding and it working great. Much better than WinForms.
I have create a class call Mission with property Name and a property Tasks of type IList<Task>.
I also create a Task class which have Name and Legnth.
Now, I have created two missions with few tasks in each of them. The missions are stored in List<Mission>. I have bound the mission list to an ItemsControl and set its ItemTemplate to Expander. The Expander header is bound to the mission's name. I then create an inner ItemsControl inside the missions control which have its ItemsSource property bound to the Tasks property. Inside the inner ItemsControl I put a TextBlock which bound to the task's name.
Everything is working great.
My question is this: I want to filter both the missions I see and the tasks I see. Filtering the mission is easy by using CollectionView.
How can I filter the tasks based on thier length and still use binding
Thank you very much,
Ido.
- 8
- Visual Studio Tools for Office Checking if excel file exists before opening
I'm writing a program in C# that will open and manipulate an excel file. However, I will need to check if the file exists BEFORE I attempt to open it. Here is what I have...
Microsoft.Office.Interop.Excel. Application xlApp = new Microsoft.Office.Interop.Excel.Application();
xlApp.Visible = false;
Workbook wb = xlApp.Workbooks.Add(@"C:\test.xls");
How can I check to see if text.xls exists before I open it
Thanks :)
- 9
- Windows Communication Foundation ("Indigo") Asynchronous calls and ChannelFactory.CreateChannel
Has anyone an example of how to implement an asynchronous call when I’ve used CreateChannnel from the ChannelFactory. I had a look around but there doesn’t seem to be any info on it.
I don’t what to use svcutil because the return types for my generic collection are returned as a dataset. I’ve tried using /ct flag and it doesn’t seem to work for my collection (it’s from llblgen) .
When I use CreateChannel and call the methods synchronously I can cast the return values to my collections with no problem.
am I missing something
Cheers
Johnny
- 10
- Windows Presentation Foundation (WPF) SpotLight in WPF cann't form a circle of light?
Hi! Guys,
I have a problem. When I use a spotlight in the 3-D scene to light a side
plane of a cube ,the result is not a circle light effect.
<Viewport3D ClipToBounds="True" Width="150" Height="150" Canvas.Left="0"
Canvas.Top="10">
<!-- Defines the camera used to view the 3D object. -->
<Viewport3D.Camera>
<PerspectiveCamera Position="0,0,2" LookDirection="0,0,-1"
FieldOfView="60" />
</Viewport3D.Camera>
<!-- The ModelVisual3D children contain the 3D models -->
<Viewport3D.Children>
<!-- A SpotLight is used to light the scene. The InnerConeAngle
and OuterConeAngle are used
to control the size of the light cone created by the
SpotLight. The Direction and Position
properties determine where the SpotLight is pointing in the
scene. In this example, the Position
of the SpotLight is set so that the SpotLight is only
illuminating the upper right-hand corner
of the 3D object. -->
<ModelVisual3D>
<ModelVisual3D.Content>
<SpotLight x:Name="mySpotLight" InnerConeAngle="15.0"
OuterConeAngle="22.0" Color="#FFFFFF" Direction="0,0,-1"
Position="0,0,5" Range="30"/>
</ModelVisual3D.Content>
</ModelVisual3D>
<ModelVisual3D>
<ModelVisual3D.Content>
<GeometryModel3D>
<!-- The geometry specifes the shape of the 3D plane. In
this sample, a flat sheet is created. -->
<GeometryModel3D.Geometry>
<MeshGeometry3D
TriangleIndices="0,1,2 3,4,5 "
Normals="0,0,1 0,0,1 0,0,1 0,0,1 0,0,1 0,0,1 "
TextureCoordinates="0,0 1,0 1,1 1,1 0,1 0,0 "
Positions="-0.5,-0.5,0.5 0.5,-0.5,0.5 0.5,0.5,0.5
0.5,0.5,0.5 -0.5,0.5,0.5 -0.5,-0.5,0.5 " />
</GeometryModel3D.Geometry>
<GeometryModel3D.Material>
<MaterialGroup>
<DiffuseMaterial>
<DiffuseMaterial.Brush> <SolidColorBrush
Color="Blue" />
</DiffuseMaterial.Brush>
</DiffuseMaterial>
</MaterialGroup>
</GeometryModel3D.Material>
</GeometryModel3D>
</ModelVisual3D.Content>
</ModelVisual3D>
</Viewport3D.Children>
</Viewport3D>
- 11
- Visual Studio Tools for Office AddIn App PathWe used to use System.Reflection.GetExecutingAssembly().Location to obtain the path to our Excel 2003 addin. In VSTO 2005 for Excel 2007 this is returning something like;
"C:\Documents and Settings\chrish\Local Settings\Application Data\assembly\dl3\Q0G97ZAE.ZN2\D7ZDXCJ1.7DR\63345ad5\54a51f05_b4fbc601\".
I've changed the code to instead use System.Reflection.GetExecutingAssembly().CodeBase. Would this be the correct method for VSTO 2005
- 12
- Windows Communication Foundation ("Indigo") Error in WCF course demo code - where is Httpcfg
In the Microsoft Learning course Clinic 5137 : Introduction to Developing WCF & VS2005 I get the following error running the WCF Demo.
I go to the above link and it directs me to use the Httpcfg tool but I cannot find Httpcfg any where on this released version of Windows Vista.
With Windows Vista is it better to develop on another platform, i.e. Win 2003 and then deploy to Windows Vista Or do I just need to get this tool on my copy of Windows Vista
Thanks
- 13
- Windows Presentation Foundation (WPF) Hyperlink bug?
I'm
using the hyperlink tag to switch my standalone window from window 1 to
window 2 and vice versa. But the link doesn't work when i click in "Go
To The Windiw 2" :-(
windows1.xaml
<Window x:Class="Server.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Server" Height="300" Width="300" > <Grid> <StackPanel Background="LightGreen"> <TextBlock DockPanel.Dock="Top" Margin="10,10,10,10">Window1</TextBlock> <TextBlock HorizontalAlignment="Left" Margin="10,10,10,10"> <Hyperlink NavigateUri="Window2.xaml">Go To The Window2</Hyperlink> </TextBlock> </StackPanel> </Grid> </Window>
windows2.xaml
<Page x:Class="Server.Window2" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window2" > <Grid> <StackPanel Background="Yellow"> <TextBlock DockPanel.Dock="Top" Margin="10,10,10,10">Window2</TextBlock> <TextBlock HorizontalAlignment="Left" Margin="10,10,10,10"> <Hyperlink NavigateUri="Window1.xaml">Go To The Window1</Hyperlink> </TextBlock> </StackPanel> </Grid> </Page>
I followed the at the end of this page: ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.NETFX30SDK4VS.1033/wpf_conceptual/html/b96bed40-8946-4285-8fe4-88045ab854ed.htm
- 14
- Windows Presentation Foundation (WPF) How are Inlines drawn?
I've been trying to understand how the FlowDocument renders it's Inline elements, but the documentation doesn't discuss this aspect.
Can you tell me how the Inlines (or Blocks also) are rendered and which classes are responsible for it
Thanks.
- 15
- Visual Studio MSBuild How to get Razzle?
I am working on WDM driver and now using WDK RC2 got from Windows Connect. I suffer a problem when I use prefast test to check my driver code.
From the feedback of MS, it has to use Razzle Window to get some more debug information. But Razzle seems an internal debug tools and is not available to the public.
Does anyone know how to get it
|
| Author |
Message |
Paolo

|
Posted: Visual Studio Source Control and SourceSafe, Vss data store |
Top |
|
| |
 |
Frank Boyne

|
Posted: Visual Studio Source Control and SourceSafe, Vss data store |
Top |
I very much doubt if Microsoft have any plans to convert Visual SourceSafe over to using SQL. If you want a Source Code Control system that uses SQl as the data store then Team Foundation Server would seem to be the product you want and not Visual SourceSafe.
Of course I'm not a Microsoft employee and I have no special knowledge of their plans for VSS. It is possible they might convert Visual SourceSafe to using SQL. It just seems unlikely (to me anyway) given the recent release of Team Foundation Server.
|
| |
|
| |
 |
Brad Peterson

|
Posted: Visual Studio Source Control and SourceSafe, Vss data store |
Top |
Paolo,
No current plans for moving to SQL as the back end. As Frank said, if you are looking for a source control system with transactions and high scalability, TFS is the current MS offering in that space
Thanks,
-Brad
Visual Studio Source Control Integration Lead
|
| |
|
| |
 |
Srinivas0906

|
Posted: Visual Studio Source Control and SourceSafe, Vss data store |
Top |
How Can I set up Visual Source Safe 6.0 into Visual Studio 2005 (ASP.NET 2.0 Project)
Ever Since I start referring on it I always got references to MTFS (MS Team Foundation Services) and/or Visual Source Safe 2005.
Imagine I just wanted to work the same way as I did in VS2003 by integrating VSS6 into it, so that I don't need to open VSS6 day in day out. And can be able to checkin/checkout/getlatest from VS2005 itself.
|
| |
|
| |
 |
Brad Peterson

|
Posted: Visual Studio Source Control and SourceSafe, Vss data store |
Top |
If you have Visual SourceSafe installed, you just need to switch the source control provider in Visual Studio.
Start VS2005
Do Tools->Options->Source Control
On the Plug-In Selection tab, choose Microsoft Visual SourceSafe
Now, any projects you put under source control with use VSS on the back end.
-Brad
|
| |
|
| |
 |
Frank Boyne

|
Posted: Visual Studio Source Control and SourceSafe, Vss data store |
Top |
As an aside, you should probably have posted your question as a separate thread rather than replying to this one - this thread is already marked as answered so your new question is less likely to be seen.
| How Can I set up Visual Source Safe 6.0 into Visual Studio 2005 |
|
I suspect what you are really asking is "How can I access my SourceSafe 6.0 database from within Visual Studio 2005 " I believe that Visual Studio 6.0 and Visual SourceSafe 2005 use the same basic data file format so you should be able to use Visual SourceSafe 2005 to access the same VSS database that other people are using Visual SourceSafe 6.0 to access. Obviously you won't get new Visual SourceSafe 2005 features like LAN helper etc but you will get access to your data (which is what you really care about). At least that's true for regular projects like C++ - I've not actually tried an ASP .NET project, there might be some gotcha I haven't thought about.
| Since I start referring on it I always got references to MTFS (MS Team Foundation Services) and/or Visual Source Safe 2005 |
|
That's because Visual Studio 2005 shows you the Source Code Control capabilities installed on your system, in your case TFS and VSS 2005. You can't have VSS 2005 and VSS 6.0 installed side-by-side. Well, ctually nothing stops you but the VSS 2005 readme emphasises that you must uninstall VSS 6.0 before installing VSS 2005. Assuming you did that, VSS 6.0 is no longer installed as a Source Code Control Provider, hence it doesn't show up in Visual Studio 2005.
|
| |
|
| |
 |
Richard Berg MSFT

|
Posted: Visual Studio Source Control and SourceSafe, Vss data store |
Top |
If you can install VSS 2005, that's my first recommendation. If you need to stick with VSS 6 for whatever reason, see this page: http://alinconstantin.homeip.net/WebDocs/SCC/_Vss6Vs2005.htm
|
| |
|
| |
 |
| |
 |
Index ‹ Visual Studio ‹ Visual Studio Source Control and SourceSafe |
- Next
- 1
- Visual Studio Tools for Office Display HTML text in Word (with VSTO)Hi,
I would like to tell Word to interpret some text in HTML form and display only the resulting text well-formated.
Here some code: Word.Range range = Range(ref missing, ref missing); range.Text = "Some normal text"; range.Bold = 1; range.InsertAfter("\n\n"); range.Collapse(ref collapseEnd);
// now the html part range.Text = "<span class="A21">This is some html content</span>" ; range.InsertAfter("\n\n");
The second part of the code displays the HTML tags instaed of interpreting it as html. Any idea how I can fix this
Thanks a lot for any help. Claudia
- 2
- Visual Studio MSBuild using of ILogicalThreadAffinative
when i using this interface
this error ....
Error 28 The "GenerateResource" task failed unexpectedly. System.Runtime.Serialization.SerializationException: Type is not resolved for member 'RAD.Infra.Contexts.InfraContext,RAD.Infra.Contexts, Version=1.0.1.1, Culture=neutral, PublicKeyToken=3f5c254063a54fe2'. at System.AppDomain.CreateInstanceFromAndUnwrap(String assemblyName, String typeName) at Microsoft.Build.Tasks.GenerateResource.Execute() at Microsoft.Build.BuildEngine.TaskEngine.ExecuteTask(ExecutionMode howToExecuteTask, Hashtable projectItemsAvailableToTask, BuildPropertyGroup projectPropertiesAvailableToTask, Boolean& taskClassWasFound) RAD.TVTO.Plan.UI
- 3
- Visual Studio Extensibility IVsTextMarkerClient multi-level context menuIs it possible to create multi-level menu items from a IVsTextMarkerClient (perhaps inside the GetMarkerCommandInfo method)
The sample code below adds one menu item for each item in the pointcuts
array, but I would like to add only one menu item with each array
element as sub menu items.
public int GetMarkerCommandInfo(IVsTextMarker pMarker, int iItem, string[] pbstrText, uint[] pcmdf)
{
if (pbstrText == null)
{
return VSConstants.S_OK;
}
uint
flags =
(uint)(Microsoft.VisualStudio.OLE.Interop.OLECMDF.OLECMDF_SUPPORTED |
Microsoft.VisualStudio.OLE.Interop.OLECMDF.OLECMDF_ENABLED);
if (iItem < pointcuts.Length)
{
pbstrText[0] = pointcuts[iItem].ToString();
pcmdf[0] = flags;
return VSConstants.S_OK;
}
return VSConstants.S_FALSE;
}
- 4
- 5
- 6
- Developer Documentation and Help System Sandcastle - Links to inherited framework members not working on my system.
Hello All,
I would appreciate some feedback on the following issue I am having with the latest version of Sandcastle. I am either doing something wrong or there would appear to be an issue with the latest sandcastle release.
When I use sandcastle ( latest release ) to generate a help 2.0 .HXS file I have noticed that when I integrate it into Visual Studio 2005 - using the help integration wizard supplied in the SDK - I seem unable to get to inherited members from the Framework when I click on them. When I look at my classes they contain inherited members like GetType(), Equals(Object) which are all inherited from the Object() class. When I click on them I get a page displayed saying "Information not found". I am sure on previous versions of sandcastle this used to work. I have had a look at the references in the help file and in the case of GetType() - which is inherited from Object() - it seems to contain references which looks quite a bit different to links which work in the existing visual studio 2005 help. In the resolve reference links of sandcastle.config file I have the "index" type set for the cpref_reflection:
<!-- resolve reference links --> <component type="Microsoft.Ddue.Tools.ResolveReferenceLinksComponent" assembly="..\..\ProductionTools\BuildComponents\BuildComponents.dll"> <targets files="reflection.xml" type="local" /> <targets files="..\cpref_reflection\*.xml" type="index" /> </component>
If I set the cpref_reflection type to "msdn" it correctly access the internet to show me details of the inherited member, it is just the setting the type to "index" does not appear to work. I am sure on previous versions of Sandcastle, when I clicked on an inherited framework member to give its details my from visual studio help files installed on my system.
If I view the source of an inheritied framework member like GetType() in the .HXS I have generated using Sandcastle it seems to have the following code which does not look right:
<td><mshelp:link keywords="GetType" tabindex="0" xmlns:mshelp="http://msdn.microsoft.com/mshelp">GetType()</mshelp:link></td><td><div class="summary">Gets the <mshelp:link keywords="Type" tabindex="0" xmlns:mshelp="http://msdn.microsoft.com/mshelp">Type</mshelp:link> of the current instance.</div> (Inherited from <mshelp:link keywords="Object" tabindex="0" xmlns:mshelp="http://msdn.microsoft.com/mshelp">Object</mshelp:link>.)</td>
I would appreciate any help on this matter as I am need to get this working as I would like to use Sandcastle to document my code.
Michael
- 7
- 8
- Windows Presentation Foundation (WPF) Clipboard Problem
Hi there
I seem te be having a problem when placing images on the clipboard. It only seems to be a problem when the code is executed on a Virtual PC and I suspect it has something to do with graphics memory, but I am not sure, and I was hoping that perhaps someone will know of a better way to accomplish this.
Here is some info on the app. We have an avalon design canvas on which all kinds of objects are placed. Later on the user can then select an area of this design canvas and "grab" a bitmap image of the selection. This bitmap image is placed on the clipboard from where it can be pasted into other applications as normal images.
Here is the code that takes, as input, a FrameworkElement, makes a bitmap out of it an returns the sub-selection inside it as a bitmap image:
public static System.Drawing.Bitmap GetWin32BitmapFromUIElement(System.Windows.FrameworkElement element, System.Windows.Rect regionInsideElement)
{
MemoryStream fs = new MemoryStream();
System.Windows.Media.Imaging. RenderTargetBitmap bmp = element.ActualHeight > 0 new RenderTargetBitmap((int)element.ActualWidth, (int)element.ActualHeight, 1 / 96, 1 / 96, System.Windows.Media.PixelFormats.Pbgra32) : new RenderTargetBitmap((int)element.Width, (int)element.Height, 1 / 96, 1 / 96, System.Windows.Media.PixelFormats.Pbgra32);
bmp.Render(element);
PngBitmapEncoder encoder = new PngBitmapEncoder();
encoder.Frames.Add( BitmapFrame.Create(bmp));
encoder.Save(fs);
System.Drawing. Image img = System.Drawing.Image.FromStream(fs);
System.Drawing. Bitmap final = new System.Drawing.Bitmap((int)regionInsideElement.Width-1, (int)regionInsideElement.Height-1);
System.Drawing. Graphics g = System.Drawing.Graphics.FromImage(final);
g.DrawImage(img, new System.Drawing.RectangleF(0, 0, (float)regionInsideElement.Width, (float)regionInsideElement.Height), new System.Drawing.RectangleF((float)regionInsideElement.Left, (float)regionInsideElement.Top, (float)regionInsideElement.Width, (float)regionInsideElement.Height), System.Drawing.GraphicsUnit.Pixel);
fs.Close();
return final;
}
After this, the resulting Bitmap object is placed on the clipboard:
System.Windows.Forms. Clipboard.Clear();
System.Drawing. Bitmap bmp = Utilities.GetWin32BitmapFromUIElement(this as FrameworkElement, areaToGrab);
System.Windows.Forms. Clipboard.SetImage(bmp);
bmp.Dispose();
bmp = null;
It is this code that causes the "Requested Clipboard Operation did not succeed" error on Virtual PCs.
Any ideas
- 9
- 10
- Visual Studio Guidance Automation Toolkit Testing a web site Using Visual studio 2005
Hi, i m using visual studio 2005 build in feature to test the website, adding the new test to the solution by going in the test menu is gud.. but when i right click on the test and say new test, i dont find any web.test in the dialog only two options, which i get are orderedtest and unit test. i m using visual studio 2005 team suite but cant find the web.test .... do i need to download this addins or whts the solution...
- 11
- Visual Studio MSBuild MSBuild NewBie question
Hi,
I just have two problems with MSBuild and wonder if somebody can help me.
1. I'm trying to incorporate NUnit tests with MSBuild, so I try the following:
<ItemGroup><TestAssembly Include="Scheduler.Service.Test.dll"> <WorkingDirectory>build\test\</WorkingDirectory> </TestAssembly></ItemGroup>
and then in task I used MSBuild Community Task:
<Target Name="UnitTest"> <NUnit ContinueOnError='true' Assemblies="@(TestAssembly)" WorkingDirectory="%(WorkingDirectory)" ToolPath="build\test\" /> </Target>
Now I want to make a test with a group of assembles, so I tried <TestAssembly Include="*.Test.dll">
However, in this case, it cannot found any of the dll because of the working directory. But if I delete the working directory, I cannot get the nunit run probably. Any suggestion for this problem
2. I'm also trying to do <replacetoken> from an xml file like NAnt like the <filterchain>. I looked up the net and find the <updatefile> attribute in the Community Task useful.
However, is there a way that you could include an xml file in the msbuild and load all the local properties in
Something that will do
<include buildfile="local.properties.xml" />
Thank you very much for the help in advance,
Cheers,
Joshua
- 12
- Windows Presentation Foundation (WPF) How to create DynamicResource in code?
Hi all,
I have a program to play slideshow. All images are imported in run-time than use XmlWriter to save. Likes below.
....
<Grid.Resources> <BitmapImage UriSource="20040714_lsps9140723_20213.jpg" x:Key="Bitmap1" /> <BitmapImage UriSource="20051010_ak0674661_030324.jpg" x:Key="Bitmap2" /> </Grid.Resources> ....
<DrawingCollection > <ImageDrawing ImageSource ="{DynamicResource Bitmap1}"/> <ImageDrawing ImageSource ="{DynamicResource Bitmap2}"/> </DrawingCollection >
My question is, How to create ImageSource ="{DynamicResource Bitmap1}" in code
Thanks.
- 13
- Visual Studio Extensibility Can I create ModelDocData and ModelDocView from the model domain class?
I serialized my model doing something like this:
SerializationResult sr = new SerializationResult();
UseCaseSampleSerializationHelper.Instance.SaveModelAndDiagram(sr, obj1.ModelRoot, @"C:\TEMP\MODEL.XML", obj2.Diagram, @"c:\temp\model.diagram");
This work fine, after i want to deserialized the model and show it on one designer, but i haven’t any file ".diagram" on the solution explorer, only I have the model load on the store:
SerializationResult sr = new SerializationResult();
UseCaseModel result=null;
Store store = new Store();
Type[] modelTypes = new Type[] {
typeof(Microsoft.VisualStudio.Modeling.Diagrams.CoreDesignSurfaceDomainModel),
typeof(Microsoft.Example.UseCases.UseCaseSampleDomainModel)
};
store.LoadDomainModels(modelTypes);
UseCaseSampleDiagram d=null;
using (Transaction t = store.TransactionManager.BeginTransaction("Reading diagram")) {
result = UseCaseSampleSerializationHelper.Instance.LoadModelAndDiagram(store, @"C:\TEMP\MODEL.XML", @"c:\temp\model.diagram", null,null);
t.Commit();
}
How can i do for create a Document and show it
Thanks.
- 14
- Windows Presentation Foundation (WPF) TreeView and several HierarchicalDataTemplate
I have two HierarchicalDataTemplates for TreeView :
< HierarchicalDataTemplate DataType="Person" ItemsSource ="{Binding XPath=*}" x:Key="BriefTemplate">
< HierarchicalDataTemplate DataType="Person" ItemsSource ="{Binding XPath=*}" x:Key="FullTemplate">
My questions are:
1. <TreeView ItemTemplate="{StaticResource BriefTemplate}" ItemContainerStyle="{StaticResource VerticalTreeItem}" Name="myTreeView" ItemsSource="{Binding Source={StaticResource FamilyTree}, XPath=*}" >
It doesn't work,I get the error : "cannot find resource BriefTemplate". How should I write resource for ItemTemplate
2. In Button Click event I want to change one HierarchicalDataTemplate to another. How should I do it
Thanks for advance.
- 15
- Visual Studio Report Controls Testing for Null in RDLC Report Field
In .net 2.0, vb.net, I am trying to display a strPhCell phone number char field, from a DataSet, using the Format() function. The Format works fine, but whenever there is NO Phone Number, the string "#error" displays on the report. I have tried every way I can think of to detect a Null or blank, but nothing works. Someone on ExpertExchange suggested the following ... which also does not work if there is no phone number. Can someone help
=IIF (Fields!strPhCell.Value is nothing, nothing, Format(cdec(Fields!strPhCell.Value),"(###) ###-####") )
cgai
|
|
|